[#9] Treat compiler warnings as errors

This commit is contained in:
Carter Jernigan 2021-09-22 12:37:15 -04:00
parent 7520e031c8
commit cec2ad260c
3 changed files with 6 additions and 0 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ build/
gen/
local.properties
/.idea/deploymentTargetDropDown.xml
*.hprof

View File

@ -85,6 +85,7 @@ android {
// TODO [#6]: Figure out how to move this into the build-conventions
kotlinOptions {
jvmTarget = libs.versions.java.get()
allWarningsAsErrors = project.property("IS_TREAT_WARNINGS_AS_ERRORS").toString().toBoolean()
}
}

View File

@ -3,6 +3,7 @@ org.gradle.vfs.watch=true
org.gradle.configureondemand=false
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx3g
kapt.include.compile.classpath=false
kapt.incremental.apt=true
@ -11,6 +12,9 @@ kapt.use.worker.api=true
android.useAndroidX=true
android.builder.sdkDownload=true
# Kotlin compiler warnings can be considered errors, failing the build.
IS_TREAT_WARNINGS_AS_ERRORS=true
# Optionally configure code coverage, as historically Jacoco has at times been buggy with respect to new Kotlin versions
IS_COVERAGE_ENABLED=true