|
|
@ -49,13 +49,9 @@ internal fun Project.configureKotlinAndroid(
|
|
|
|
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
kotlinOptions {
|
|
|
|
// Treat all Kotlin warnings as errors (disabled by default)
|
|
|
|
// Treat all Kotlin warnings as errors (disabled by default)
|
|
|
|
// Override locally using local.properties
|
|
|
|
// Override by setting warningsAsErrors=true in your ~/.gradle/gradle.properties
|
|
|
|
val localOverrideWarningsAsErrors = gradleLocalProperties(rootDir)
|
|
|
|
|
|
|
|
.getProperty("warningsAsErrors")?.toBoolean()
|
|
|
|
|
|
|
|
// Set on CI through gradle.properties
|
|
|
|
|
|
|
|
val warningsAsErrors: String? by project
|
|
|
|
val warningsAsErrors: String? by project
|
|
|
|
// Prefer local.properties, gradle.properties, or default to false when both are null
|
|
|
|
allWarningsAsErrors = warningsAsErrors.toBoolean()
|
|
|
|
allWarningsAsErrors = localOverrideWarningsAsErrors ?: warningsAsErrors.toBoolean()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
freeCompilerArgs = freeCompilerArgs + listOf(
|
|
|
|
freeCompilerArgs = freeCompilerArgs + listOf(
|
|
|
|
"-opt-in=kotlin.RequiresOptIn",
|
|
|
|
"-opt-in=kotlin.RequiresOptIn",
|
|
|
|