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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions runners/gradle-plugin/build.gradle.kts
Expand Up @@ -30,6 +30,16 @@ 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.

exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib")
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk7")
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-jdk8")
exclude(group = "org.jetbrains.kotlin", module = "kotlin-stdlib-common")
}


val sourceJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
Expand Down
1 change: 1 addition & 0 deletions runners/gradle-plugin/gradle.properties
@@ -0,0 +1 @@
kotlin.stdlib.default.dependency=false