Upgrade workflows to use Java 17 (#1579)

This commit is contained in:
Harsh Shandilya 2021-12-07 20:51:54 +05:30 committed by GitHub
parent 38bfcfdcae
commit 1df01a2f54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 32 additions and 14 deletions

View file

@ -4,6 +4,7 @@
*/
import org.gradle.api.JavaVersion
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.api.tasks.testing.Test
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.kotlin.dsl.withType
@ -11,6 +12,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val additionalCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
allWarningsAsErrors = true