mirror of
https://github.com/google/nomulus
synced 2026-01-05 13:07:04 +00:00
Allow switching off the -Werror javac option
This option causes Intellij build to fail if the 'Delegate IDE build/run actions to gradle' box is checked. We do not know of anyway to change the Intellij behavior. This change allows an IDE user to prevent -Werror to be passed to javac by adding a Gradle VM option: -Dno_werror=true
This commit is contained in:
@@ -15,6 +15,12 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
|
// The -Werror flag causes Intellij to fail on deprecated api use.
|
||||||
|
// Allow IDE user to turn off this flag by specifying a Gradle VM
|
||||||
|
// option from inside the IDE.
|
||||||
|
if (System.getProperty('no_werror') != 'true') {
|
||||||
|
options.compilerArgs << "-Werror"
|
||||||
|
}
|
||||||
options.compilerArgs << "-Werror"
|
options.compilerArgs << "-Werror"
|
||||||
options.errorprone.disableWarningsInGeneratedCode = true
|
options.errorprone.disableWarningsInGeneratedCode = true
|
||||||
options.errorprone.errorproneArgumentProviders.add([
|
options.errorprone.errorproneArgumentProviders.add([
|
||||||
|
|||||||
Reference in New Issue
Block a user