Skip to content
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

Do not expose kotlin stdlib in the Gradle plugin dependencies #2543

Merged
merged 2 commits into from Jun 21, 2022

Conversation

martinbonnin
Copy link
Contributor

Because Gradle will put its own Kotlin stdlib in the classpath, it's no use adding it as a transitive dependency. It might even cause compilation errors.

See https://kotlinlang.slack.com/archives/C0F4UNJET/p1655743911527999

Copy link
Member

@vmishenev vmishenev left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

@@ -30,6 +30,15 @@ dependencies {
)
}

// Gradle will put its own version of the stdlib in the classpath, do not pull our own we will end up with
// warnings like 'Runtime JAR files in the classpath should have the same version'
configurations.api {
Copy link
Member

Choose a reason for hiding this comment

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

It excludes stdlib from :core dependency.
So stdlib will be taken from gradleApi (that is added by java-gradle-plugin)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. Note I'm not 100% certain how gradleApi works (e.g. it doesn't show kotlin-stdlib in ./gradlew dependencies even if it's there)

Also I just realize I forgot kotlin-stdlib-common, I just pushed it.

Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

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

Well done, thanks!

I've started integration tests, let's wait for it to complete, and it'll be ready for merge

@IgnatBeresnev
Copy link
Member

Will be released in 1.7.10, thanks once again!

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.

[1.7.0] Runtime JAR files in the classpath should have the same version
3 participants