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

Omit the stdlib from the compiler plugin and gradle plugin artifacts #218

Merged
merged 2 commits into from
May 12, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

**Unreleased**
--------------

- Omit the stdlib from transitive dependencies on the compiler plugin and Gradle plugin artifacts. Both kotlinc and Gradle impose their own versions on the classpath.

1.8.1
-----

Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref =
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-gradlePlugin-api = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin-api", version.ref = "kotlin" }
kotlin-aptEmbeddable = { module = "org.jetbrains.kotlin:kotlin-annotation-processing-embeddable", version.ref = "kotlin" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }

ksp = { module = "com.google.devtools.ksp:symbol-processing", version.ref = "ksp" }
ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
Expand Down
1 change: 1 addition & 0 deletions redacted-compiler-plugin-gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ spotless {
dependencies {
compileOnly(libs.kotlin.gradlePlugin)
compileOnly(libs.kotlin.gradlePlugin.api)
compileOnly(libs.kotlin.stdlib)
}

configure<MavenPublishBaseExtension> { publishToMavenCentral(automaticRelease = true) }
Expand Down
3 changes: 3 additions & 0 deletions redacted-compiler-plugin-gradle/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ POM_NAME=Redacted Compiler Plugin (Gradle)
POM_ARTIFACT_ID=redacted-compiler-plugin-gradle
POM_PACKAGING=jar

# Gradle imposes its own
kotlin.stdlib.default.dependency=false

GROUP=dev.zacsweers.redacted
VERSION_NAME=1.9.0-SNAPSHOT
POM_DESCRIPTION=A Kotlin compiler plugin that generates redacted toString() implementations.
Expand Down
2 changes: 2 additions & 0 deletions redacted-compiler-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ tasks.withType<Test>().configureEach {

dependencies {
compileOnly(libs.kotlin.compilerEmbeddable)
compileOnly(libs.kotlin.stdlib)
implementation(libs.autoService)
ksp(libs.autoService.ksp)

testImplementation(libs.kotlin.reflect)
testImplementation(libs.kotlin.stdlib)
testImplementation(libs.kotlin.compilerEmbeddable)
// Cover for https://github.com/tschuchortdev/kotlin-compile-testing/issues/274
testImplementation(libs.kotlin.aptEmbeddable)
Expand Down
3 changes: 3 additions & 0 deletions redacted-compiler-plugin/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
POM_NAME=Redacted Compiler Plugin
POM_ARTIFACT_ID=redacted-compiler-plugin
POM_PACKAGING=jar

# kotlinc imposes its own
kotlin.stdlib.default.dependency=false