Skip to content

Commit

Permalink
add the kotlin-bom instead of one certain module in order to ensure c…
Browse files Browse the repository at this point in the history
…orrect dependency resolution (#70)
  • Loading branch information
klu2 authored Aug 2, 2022
1 parent 4dd1417 commit 7a4018f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
kotlin.code.style=official

version=0.6.0-SNAPSHOT
version=0.6.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ class KotlinConfigurePlugin : Plugin<Project> {
kotlin.sourceSets.maybeCreate("main").dependencies {
// see https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library
// as we allow clients to override the Kotlin Version, (i.e. to 1.5.20), we also want to ensure
// that in this case the kotlin-stdtlib-jdk8 from exactly that Kotlin version is being added
// to the dependencies. Without those lines, we would always add the stdlib in the version
// of the underlying Kotlin Gradle Plugin (1.6.20 at the time of that writing)
this.implementation(kotlinConfigureExtension.kotlinVersion
.map { "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$it" }
// that all kotlin standard libraries from exactly that Kotlin version is being added
// to the dependencies. That's why we add the kotlin-bom in exactly our version here.
// Without those lines, we would always add the stdlib in the version
// of the underlying Kotlin Gradle Plugin (1.7.10 at the time of that writing)
this.api(kotlinConfigureExtension.kotlinVersion
.map { project.dependencies.platform("org.jetbrains.kotlin:kotlin-bom:$it") }
)
}

Expand Down

0 comments on commit 7a4018f

Please sign in to comment.