Skip to content

Commit 3cd1d5b

Browse files
committed
Excluded stdlib transitive dependency
Resolves #135
1 parent 90712aa commit 3cd1d5b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

build.gradle.kts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ sourceSets {
2121

2222
dependencies {
2323
implementation(gradleApi())
24+
// exclude transitive dependency on stdlib, the Gradle version should be used
25+
compileOnly(kotlin("stdlib"))
2426

2527
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
2628
compileOnly("com.android.tools.build:gradle:4.2.2")
@@ -32,7 +34,6 @@ dependencies {
3234
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
3335
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.10")
3436
"functionalTestCompileOnly"("org.jetbrains.kotlin:kotlin-compiler-runner:1.6.10")
35-
3637
}
3738

3839
java {
@@ -67,12 +68,13 @@ tasks.check { dependsOn("functionalTest") }
6768

6869
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
6970
kotlinOptions {
70-
languageVersion = "1.5"
71-
7271
allWarningsAsErrors = true
73-
// Suppress the warning about kotlin-reflect 1.3 and kotlin-stdlib 1.4 in the classpath.
74-
// It's incorrect in this case because we're limiting API version to 1.3 anyway.
75-
freeCompilerArgs = freeCompilerArgs + "-Xskip-runtime-version-check"
72+
73+
// Kover works with the stdlib of at least version `1.4.x`
74+
languageVersion = "1.4"
75+
apiVersion = "1.4"
76+
// Kotlin compiler 1.6 issues a warning if `languageVersion` or `apiVersion` 1.4 is used - suppress it
77+
freeCompilerArgs = freeCompilerArgs + "-Xsuppress-version-warnings"
7678
}
7779
}
7880

0 commit comments

Comments
 (0)