Skip to content

Commit 5209ff1

Browse files
antohabytimofey-solonin
authored andcommitted
[Uklibs] Add information about planned changes in the current dependencies model
1 parent ddaa971 commit 5209ff1

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

proposals/KEEP-0446-kmp-publication-scheme.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,11 @@ then we will need to define how multiple dimensions of "Kotlin Attributes" inter
365365

366366
## Addressing UX issues of new KMP resolution scheme
367367

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:
369373
```kotlin
370374
// producer/build.gradle.kts
371375
kotlin {
@@ -399,5 +403,14 @@ kotlin {
399403
```
400404

401405
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.
403414

415+
We will also add the possibility to declare dependencies on Kotlin-extension level instead of the source set level in
416+
the KMP Kotlin Gradle Plugin.

0 commit comments

Comments
 (0)