UKlibs and KMP Publication Scheme #462
Replies: 3 comments 9 replies
-
Integration with variant-aware resolutionI think it is important to ensure that Gradle can still understand the different platforms as variants. This doesn't mean the UKLib format must be changed, but the necessary artifact transforms should be declared on the KGP side such that plugins and the ecosystem can continue dealing with variants. An example of such usage is my plugin Multiple other projects have had similar needs. If I recall correctly, Kobweb needed to add some metadata to know if a library was specifically Kobweb-aware or not. I can see this being useful to store other kinds of metadata, e.g. a list of services implemented by the module, service-loader style. I don't think this needs to be within the UKLib file itself, I think it is perfectly acceptable that these other files are separate files behind the same Maven coordinates. However, I think care must be taken that KGP acts as if the contents of the UKLib were using dependency-aware resolution, such that all of these things can integrate together. |
Beta Was this translation helpful? Give feedback.
-
All platforms are in a single artifact
One downside is that projects using a few numbers of projects will still need to download and extract all platforms. I expect that the ecosystem will follow this pattern:
For example, a Kobweb or Kilua codebase will likely only support JVM/JS/Wasm, but they will have to download all flavors of Native for all the libraries they depend on. Today, close to half of Kotlin users are server-side developers, who only need the JVM. How much will these changes impact them? Even if the compression algorithm is quite good, that will still increase the overall download size. (though having everything in a single file could decrease download time as Gradle can't download in parallel). |
Beta Was this translation helpful? Give feedback.
-
Consequence №1. It's not possible to "restrict" visibility of a KMP library to only some fragments:It is fairly common that I declare a dependency only for a single platform. For example, What will be the developer experience when adding a dependency on a library that only provides a subset of the platforms supported by the project? Today, adding such a library in If I understand this KEEP correctly, users who declare a dependency on a library that doesn't support all platforms will simply not see the symbols from the library in their |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is an issue to discuss two KEEP proposals regarding the:
Beta Was this translation helpful? Give feedback.
All reactions