@@ -90,17 +90,19 @@ configure(allprojects) { project ->
90
90
resolutionStrategy. cacheChangingModulesFor 0 , ' seconds'
91
91
}
92
92
93
- def compilerArgs = [
94
- " -Xlint:serial" , " -Xlint:varargs" , " -Xlint:cast" , " -Xlint:classfile" ,
95
- " -Xlint:dep-ann" , " -Xlint:divzero" , " -Xlint:empty" , " -Xlint:finally" ,
96
- " -Xlint:overrides" , " -Xlint:path" , " -Xlint:processing" , " -Xlint:static" ,
97
- " -Xlint:try" , " -Xlint:fallthrough" , " -Xlint:rawtypes" , " -Xlint:deprecation" ,
98
- " -Xlint:unchecked" , " -Xlint:-options"
93
+ def commonCompilerArgs = [
94
+ " -Xlint:serial" , " -Xlint:cast" , " -Xlint:classfile" , " -Xlint:dep-ann" ,
95
+ " -Xlint:divzero" , " -Xlint:empty" , " -Xlint:finally" , " -Xlint:overrides" ,
96
+ " -Xlint:path" , " -Xlint:processing" , " -Xlint:static" , " -Xlint:try" , " -Xlint:-options"
99
97
]
100
98
101
- compileJava. options* . compilerArgs = compilerArgs + " -Werror"
99
+ compileJava. options* . compilerArgs = commonCompilerArgs +
100
+ [" -Xlint:varargs" , " -Xlint:fallthrough" , " -Xlint:rawtypes" ,
101
+ " -Xlint:deprecation" , " -Xlint:unchecked" , " -Werror" ]
102
102
103
- compileTestJava. options* . compilerArgs = compilerArgs
103
+ compileTestJava. options* . compilerArgs = commonCompilerArgs +
104
+ [" -Xlint:-varargs" , " -Xlint:-fallthrough" ," -Xlint:-rawtypes" ,
105
+ " -Xlint:-deprecation" , " -Xlint:-unchecked" ]
104
106
105
107
compileJava {
106
108
sourceCompatibility = 1.8
0 commit comments