make error-prone opt-in

This commit is contained in:
Andrew Kent 2018-12-18 16:34:38 -08:00
parent d0f3cfa3d6
commit 34e866ef2b
1 changed files with 9 additions and 7 deletions

View File

@ -15,13 +15,16 @@ lombok { // optional: values below are the defaults
sha256 = "" sha256 = ""
} }
if (project.hasProperty('enableErrorProne')) {
apply plugin: "net.ltgt.errorprone" apply plugin: "net.ltgt.errorprone"
tasks.withType(JavaCompile) { tasks.withType(JavaCompile) {
outputs.upToDateWhen { false }
options.compilerArgs += ['-Xep:FutureReturnValueIgnored:OFF'] options.compilerArgs += ['-Xep:FutureReturnValueIgnored:OFF']
// workaround for: https://github.com/google/error-prone/issues/780 // workaround for: https://github.com/google/error-prone/issues/780
options.compilerArgs += ['-Xep:ParameterName:OFF'] options.compilerArgs += ['-Xep:ParameterName:OFF']
options.compilerArgs += ['-XepDisableWarningsInGeneratedCode'] options.compilerArgs += ['-XepDisableWarningsInGeneratedCode']
} }
}
apply plugin: "eclipse" apply plugin: "eclipse"
eclipse { eclipse {
@ -262,4 +265,3 @@ plugins.withType(BasePlugin) {
otherTasks*.mustRunAfter deleteTasks otherTasks*.mustRunAfter deleteTasks
} }
} }