Skip to content

Commit

Permalink
Make sure Gradle Module Metadata targets the appropriate JVM version
Browse files Browse the repository at this point in the history
irrespective of the JDK used for the build (as this is
all Kotlin anyway).
  • Loading branch information
tbroyer committed Oct 11, 2022
1 parent 46cdc01 commit 7a99420
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ dependencyLocking {

group = "net.ltgt.gradle"

// Make sure Gradle Module Metadata targets the appropriate JVM version
tasks.withType<JavaCompile>().configureEach {
options.release.set(kotlinDslPluginOptions.jvmTarget.map { JavaVersion.toVersion(it).majorVersion.toInt() })
}

tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.allWarningsAsErrors = true
}
Expand Down

0 comments on commit 7a99420

Please sign in to comment.