From 4aa4b1ebd17a7f199dc486eb66788d6310339af6 Mon Sep 17 00:00:00 2001 From: weisj <31143295+weisJ@users.noreply.github.com> Date: Tue, 28 Sep 2021 22:52:42 +0200 Subject: [PATCH] CI: Disable Werror by default We enable it on the errorprone CI though --- .github/workflows/errorprone.yml | 2 +- build.gradle.kts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/errorprone.yml b/.github/workflows/errorprone.yml index a0111b86..81e287a5 100644 --- a/.github/workflows/errorprone.yml +++ b/.github/workflows/errorprone.yml @@ -11,4 +11,4 @@ jobs: with: fetch-depth: 10 - name: Check - run: ./gradlew compileJava -PenableErrorProne + run: ./gradlew compileJava -PenableErrorProne -PWerror diff --git a/build.gradle.kts b/build.gradle.kts index 8d623f35..06491022 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -229,7 +229,10 @@ allprojects { } } tasks.withType().configureEach { - options.compilerArgs.addAll(listOf("-Xmaxerrs", "10000", "-Xmaxwarns", "10000", "-Werror")) + options.compilerArgs.addAll(listOf("-Xmaxerrs", "10000", "-Xmaxwarns", "10000")) + if (props.bool("Werror", false)) { + options.compilerArgs.add("-Werror") + } options.errorprone { errorproneArgs.add("-XepExcludedPaths:.*/javacc/.*") disableWarningsInGeneratedCode.set(true)