Skip to content

Commit 4b7ddb0

Browse files
authored
Gradle plugin: change kotlin-reflect from implementation to compileOnly
The only usage of Kotlin Reflect is inside a Worker[1], so the classpath is isolated. This means the Kotlin Reflect dependency can be changed from `implementation` to `compileOnly`. To avoid clashes with Gradle's embedded Kotlin, and with other plugins, Gradle plugins should avoid using unnecessary dependencies. Continuation of #229 [1] https://github.com/Kotlin/kotlinx-benchmark/blob/e9becb5101be4e458e1cfcd07936571f85bcb569/plugin/main/src/kotlinx/benchmark/gradle/JmhBytecodeGeneratorWorker.kt#L187
1 parent 62e2799 commit 4b7ddb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ kotlin {
105105
}
106106

107107
dependencies {
108-
implementation(libs.kotlin.reflect)
108+
compileOnly(libs.kotlin.reflect)
109109

110110
implementation(libs.squareup.kotlinpoet)
111111

0 commit comments

Comments
 (0)