From d3cb7751014289b5e84ed8b11397aa35663f828a Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Tue, 30 Jan 2018 08:35:58 -0800 Subject: [PATCH] Configure error prone Disable a few noisy warnings. --- app/build.gradle | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 4a1cb3d94..027b25695 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -376,3 +376,37 @@ android.applicationVariants.all { variant -> exclude '**/R.java' } } + +buildscript { + repositories { + maven { + url "https://plugins.gradle.org/m2/" + } + } + dependencies { + classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13" + } +} + +apply plugin: "net.ltgt.errorprone" + +tasks.withType(JavaCompile) { + options.compilerArgs += [ + '-Xep:CatchFail:OFF', + '-Xep:ClassCanBeStatic:OFF', + '-Xep:DateFormatConstant:OFF', + '-Xep:DefaultCharset:OFF', + '-Xep:FormatString:OFF', + '-Xep:JavaLangClash:OFF', + '-Xep:MissingCasesInEnumSwitch:OFF', + '-Xep:MissingOverride:OFF', + '-Xep:NonAtomicVolatileUpdate:OFF', + '-Xep:OperatorPrecedence:OFF', + '-Xep:StringSplitter:OFF', + '-Xep:UnsynchronizedOverridesSynchronized:OFF', + ] +} + +configurations.errorprone { + resolutionStrategy.force 'com.google.errorprone:error_prone_core:2.2.0' +}