Skip to content

Commit

Permalink
Omit the stdlib from the compiler plugin and gradle plugin artifacts (#…
Browse files Browse the repository at this point in the history
…218)

* Omit the stdlib from the compiler plugin and gradle plugin artifacts

Resolves #199

* Add stdlib deps where appropriate
  • Loading branch information
ZacSweers committed May 12, 2024
1 parent d863e2a commit 4a5a3de
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
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

0 comments on commit 4a5a3de

Please sign in to comment.