fix(build): only enable -Werror in CI

This commit is contained in:
Harsh Shandilya 2023-07-22 15:44:52 +05:30
parent 3b6964ffab
commit 1581d2e00c

View file

@ -24,7 +24,7 @@ class KotlinCommonPlugin : Plugin<Project> {
project.tasks.run {
withType<KotlinCompile>().configureEach task@{
compilerOptions {
allWarningsAsErrors.set(true)
allWarningsAsErrors.set(project.providers.environmentVariable("CI").isPresent)
languageVersion.set(KotlinVersion.KOTLIN_1_9)
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
if (!this@task.name.contains("test", ignoreCase = true) && !isAppModule) {