Merge "Revert "Enable error prone by default""
diff --git a/build.gradle b/build.gradle
index 069b179..4eb27ef 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"
         }
     }