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:
parent
711fafc924
commit
c648425822
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue