mirror of
https://github.com/google/nomulus.git
synced 2025-04-29 19:47:51 +02: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:
parent
7448140e06
commit
46c90133bd
1 changed files with 6 additions and 0 deletions
|
@ -15,6 +15,12 @@ dependencies {
|
|||
}
|
||||
|
||||
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.errorprone.disableWarningsInGeneratedCode = true
|
||||
options.errorprone.errorproneArgumentProviders.add([
|
||||
|
|
Loading…
Add table
Reference in a new issue