Revert "Enable error prone by default"
This reverts commit 8f3aabe863734b59d316243df221859cd52103d9.
Reason for revert: <INSERT REASONING HERE>
Change-Id: I248e21325095299c9c540f7cb148525979030ecb
diff --git a/build.gradle b/build.gradle
index d908fa8..76b6e47 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,16 +8,14 @@
apply plugin: 'idea'
apply plugin: 'com.google.protobuf'
apply plugin: 'com.cookpad.android.licensetools'
-if (!project.hasProperty('without_error_prone')) {
+if (project.hasProperty('with_error_prone')) {
apply plugin: "net.ltgt.errorprone"
tasks.withType(JavaCompile) {
options.compilerArgs += [
'-XepDisableAllChecks',
- // D8 want to use reference equality, thus disable the checker explicitly
- '-Xep:ReferenceEquality:OFF',
- '-Xep:ClassCanBeStatic:WARN',
- '-Xep:OperatorPrecedence:WARN',
- '-Xep:RemoveUnusedImports:WARN']
+ '-Xep:ClassCanBeStatic:ERROR',
+ '-Xep:OperatorPrecedence:ERROR',
+ '-Xep:RemoveUnusedImports:ERROR']
}
}
@@ -49,7 +47,7 @@
// support java9.
// classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath files("third_party/shadow/shadow-2.0.1.jar")
- if (!project.hasProperty('without_error_prone')) {
+ if (project.hasProperty('with_error_prone')) {
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13"
}
}