|
|
|
@ -40,8 +40,10 @@ internal fun Project.configureKotlinAndroid(
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
// Up to Java 11 APIs are available through desugaring
|
|
|
|
|
// https://developer.android.com/studio/write/java11-minimal-support-table
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
|
|
|
isCoreLibraryDesugaringEnabled = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -50,7 +52,7 @@ internal fun Project.configureKotlinAndroid(
|
|
|
|
|
tasks.withType<KotlinCompile>().configureEach {
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
// Set JVM target to 17
|
|
|
|
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
|
|
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
|
|
|
// Treat all Kotlin warnings as errors (disabled by default)
|
|
|
|
|
// Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties
|
|
|
|
|
val warningsAsErrors: String? by project
|
|
|
|
|