diff --git a/build.gradle.kts b/build.gradle.kts index 8aa39e668..fa5ebc6ea 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.sonarsource.kotlin.buildsrc.tasks.CreateKotlinGradleRuleStubsTask import org.sonarsource.kotlin.buildsrc.tasks.CreateKotlinRuleStubsTask @@ -125,7 +126,7 @@ subprojects { } tasks.withType().all { - kotlinOptions.jvmTarget = java.sourceCompatibility.toString() + compilerOptions.jvmTarget = JvmTarget.fromTarget(java.sourceCompatibility.toString()) } jacoco { diff --git a/kotlin-checks-test-sources/build.gradle.kts b/kotlin-checks-test-sources/build.gradle.kts index 4efc49e17..55a601203 100644 --- a/kotlin-checks-test-sources/build.gradle.kts +++ b/kotlin-checks-test-sources/build.gradle.kts @@ -24,7 +24,7 @@ dependencies { sonarqube.isSkipProject = true val compileKotlin: KotlinCompile by tasks -compileKotlin.kotlinOptions { +compileKotlin.compilerOptions { suppressWarnings = true }