Ignore warnings for missing classpath elements with custom JAVA_HOME

Prior to this commit, the "-Werror" was removed as a command-line
argument in order not to fail the build for missing classpath elements.

This commit reinstates "-Werror" and removes "-Xlink:path" in order to
explicitly ignore warnings for missing classpath elements when executing
the build with a custom JAVA_HOME.

See gh-24474
This commit is contained in:
Sam Brannen 2020-02-07 10:23:07 +01:00
parent 711fafc924
commit c648425822
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ if (customJavaHome) {
}
options.fork = true
options.forkOptions.executable = javacExecutable
options.compilerArgs -= "-Werror"
// Ignore warnings about missing classpath elements -- for example, those picked up
// via Class-Path entries in MANIFEST.MF files in artifacts like xalan-2.7.2.jar.
options.compilerArgs -= "-Xlint:path"
if (customJavaSourceVersion) {
options.compilerArgs += [ "--release", customJavaSourceVersion]
inputs.property("customJavaSourceVersion", customJavaSourceVersion)