-
Notifications
You must be signed in to change notification settings - Fork 427
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
Do not expose kotlin stdlib in the Gradle plugin dependencies #2543
Conversation
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.
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 { |
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 excludes stdlib
from :core
dependency.
So stdlib
will be taken from gradleApi
(that is added by java-gradle-plugin
)
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.
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.
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.
Well done, thanks!
I've started integration tests, let's wait for it to complete, and it'll be ready for merge
Will be released in 1.7.10, thanks once again! |
(cherry picked from commit 3f4336d)
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