You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: proposals/KEEP-0446-kmp-publication-scheme.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -365,7 +365,11 @@ then we will need to define how multiple dimensions of "Kotlin Attributes" inter
365
365
366
366
## Addressing UX issues of new KMP resolution scheme
367
367
368
-
In the current source set level KMP dependency model in Kotlin Gradle Plugin, explaining “where can’t I write code with this KMP dependency” is achieved through Gradle resolution errors. Explaining granular KMP resolution through Gradle resolution errors is not ideal, but provides some intuition about where the API from the consumed dependencies will (not) be available. For example:
368
+
In the current source set level KMP dependency model in Kotlin Gradle Plugin, explaining “where can’t I write code
369
+
with this KMP dependency” is achieved through Gradle resolution errors. Explaining granular KMP resolution through
370
+
Gradle resolution errors is not ideal, but provides some intuition about where the API from the consumed dependencies
371
+
will (not) be available.
372
+
For example:
369
373
```kotlin
370
374
// producer/build.gradle.kts
371
375
kotlin {
@@ -399,5 +403,14 @@ kotlin {
399
403
```
400
404
401
405
With the UKlib publication changes the Gradle resolution errors will be suppressed, and it might not be clear where (if at all)
402
-
the consumed dependency is accessible; however the UX issue of explaining which producer code is available in what consumer compilation is out of scope for this proposal and will be addressed separately.
406
+
the consumed dependency is accessible. To mitigate this issue before releasing UKlibs, we will provide a diagnostic tool
407
+
to understand what API of a consumed library is available in the source sets of the consumer project.
408
+
409
+
## Changes in current KMP Dependencies Model in Kotlin Gradle Plugin
410
+
411
+
We plan to change the current KMP dependency model to be compatible with the UKlib dependency model to allow gradual migration.
412
+
To allow consumption of partially compatible dependencies, we will infer the visible consumed API in the current KMP publication.
413
+
The lenient resolution will be achieved by using `metadataApiElements` variant as a fallback when the platform variant is not available.
403
414
415
+
We will also add the possibility to declare dependencies on Kotlin-extension level instead of the source set level in
0 commit comments