-
Notifications
You must be signed in to change notification settings - Fork 265
Update KMP compatibility guide for 2.3.0 #584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
antohaby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of androidTarget occurrences are still in compose-test and multiplatform-dsl-reference (especially important to update the table that mentions Android Gradle plugin)
Plus, I think, we now need to update the diagrams for multiplatform hierarchy
| **When do the changes take effect?** | ||
|
|
||
| **What's the best practice now?** | ||
| Here's the planned deprecation cycle: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be just a paragraph, the list with only one item seems odd. Plus, the KMP guide is generally more descriptive
| * 2.3.0: report a warning when the `kotlin.mpp.import.enableKgpDependencyResolution=false` Gradle property is used | ||
| You can change the code above in one of the following ways: | ||
| ### Remove `kotlin.mpp.resourcesResolutionStrategy` Gradle property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change should be in this common guide, it doesn't require a detailed explanation and doesn't fit the criteria for the KMP guide
| default source set of the `KotlinCompilation` to `someSourceSet`. We recommend referring to the source directly using `by getting`, | ||
| which is shorter and more readable. However, you can also use `KotlinCompilation.defaultSourceSet.dependsOn(someSourceSet)`, | ||
| which is applicable in all cases. | ||
| * 2.3.0: report a warning when the `kotlin.mpp.import.enableKgpDependencyResolution=false` Gradle property is used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest changes in this guide should be put at the top, it's in reverse order
|
|
||
| Here's the deprecation cycle: | ||
|
|
||
| * 1.9.0: introduce a deprecation warning when `KotlinComplation.source` is used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * 1.9.0: introduce a deprecation warning when `KotlinComplation.source` is used | |
| * 1.9.0: introduce a deprecation warning when `KotlinCompilation.source` is used |
| * 2.3.0: introduce a deprecation warning when the `androidTarget` name is used in Kotlin Multiplatform projects | ||
|
|
||
| <anchor name="compilation-source-deprecation"/> | ||
| ### Removed API for adding Kotlin source sets directly to the Kotlin compilation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need to move it out of 1.9.* section, it was already an error in 1.9.20
| * 1.9.0: introduce a deprecation warning when the `android` name is used in Kotlin Multiplatform projects | ||
| * 2.1.0: raise this warning to an error | ||
| * 2.2.0: remove the `android` target DSL from the Kotlin Multiplatform Gradle plugin | ||
| * 2.3.0: introduce a deprecation warning when the `androidTarget` name is used in Kotlin Multiplatform projects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like a step is missing here, the android name is removed, and the androidTarget name is also deprecated, maybe explicitly add
- 2.3.0: new Android plugin is available, a deprecation warning for the
androidTargetname is used in Kotlin Multiplatform projects
| Before Kotlin 2.3.0, we provided support for the Android target through the `com.android.application` and `com.android.library` plugins. | ||
| This was a temporary solution while the Android team at Google developed a separate plugin tailored to Kotlin Multiplatform. | ||
|
|
||
| Initially, we used the `android` block, but later transitioned to the `androidTarget` block so that the `android` block could be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Initially, we used the `android` block, but later transitioned to the `androidTarget` block so that the `android` block could be | |
| Initially, we used the `android` block, but later transitioned to the `androidTarget` block so that the `android` name could be |
This PR adds new sections to the compatibility guide for Kotlin 2.3.0.