build: configure Kotlin options for all projects

This commit is contained in:
Harsh Shandilya 2021-08-05 21:17:47 +05:30
parent 7c7ad41129
commit d65e14b2c8
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 9 additions and 9 deletions

View file

@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
repositories {
google()
@ -45,6 +47,13 @@ allprojects {
.config(mapOf("parser" to "xml", "tabWidth" to 2))
}
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
languageVersion = "1.5"
freeCompilerArgs = freeCompilerArgs + listOf("-Xopt-in=kotlin.RequiresOptIn")
}
}
}
tasks.withType<Wrapper> {