Browse Source

Share common compiler args between src and test

Issue: SPR-15885
pull/1503/head
Brian Clozel 7 years ago
parent
commit
a1e898fd39
  1. 18
      build.gradle

18
build.gradle

@ -90,17 +90,19 @@ configure(allprojects) { project -> @@ -90,17 +90,19 @@ configure(allprojects) { project ->
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
def compilerArgs = [
"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
"-Xlint:unchecked", "-Xlint:-options"
def commonCompilerArgs = [
"-Xlint:serial", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann",
"-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides",
"-Xlint:path", "-Xlint:processing", "-Xlint:static", "-Xlint:try", "-Xlint:-options"
]
compileJava.options*.compilerArgs = compilerArgs + "-Werror"
compileJava.options*.compilerArgs = commonCompilerArgs +
["-Xlint:varargs", "-Xlint:fallthrough", "-Xlint:rawtypes",
"-Xlint:deprecation", "-Xlint:unchecked", "-Werror"]
compileTestJava.options*.compilerArgs = compilerArgs
compileTestJava.options*.compilerArgs = commonCompilerArgs +
["-Xlint:-varargs", "-Xlint:-fallthrough","-Xlint:-rawtypes",
"-Xlint:-deprecation", "-Xlint:-unchecked"]
compileJava {
sourceCompatibility = 1.8

Loading…
Cancel
Save