fix(build): only enable -Werror in CI

This commit is contained in:
Harsh Shandilya 2024-07-07 23:18:38 +05:30
parent 9815ef1910
commit 05a8b9bc67

View file

@ -29,7 +29,7 @@ class KotlinCommonPlugin : Plugin<Project> {
project.tasks.run { project.tasks.run {
withType<KotlinCompile>().configureEach { withType<KotlinCompile>().configureEach {
compilerOptions { compilerOptions {
allWarningsAsErrors.set(true) allWarningsAsErrors.set(project.providers.environmentVariable("CI").isPresent)
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS) freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
languageVersion.set(KotlinVersion.KOTLIN_1_9) languageVersion.set(KotlinVersion.KOTLIN_1_9)
} }