Skip to content

Commit

Permalink
Ignore warnings for missing classpath elements with custom JAVA_HOME
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sbrannen committed Feb 7, 2020
1 parent 711fafc commit c648425
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gradle/custom-java-home.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c648425

Please sign in to comment.