Skip to content

Conversation

@sarahhaggarty
Copy link
Collaborator

This PR adds new sections to the compatibility guide for Kotlin 2.3.0.

Copy link
Contributor

@antohaby antohaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is good!

@danil-pavlov danil-pavlov self-requested a review December 12, 2025 17:22
@danil-pavlov danil-pavlov marked this pull request as ready for review December 12, 2025 17:22
@danil-pavlov danil-pavlov requested a review from a team as a code owner December 12, 2025 17:22
Copy link
Collaborator

@danil-pavlov danil-pavlov left a 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:
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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
Copy link
Collaborator

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
Copy link
Collaborator

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 androidTarget name 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants