Adapt release flag to new CLI arguments

The JDK project is in the process of modifying the command-line flags
for various JDK tools (http://openjdk.java.net/jeps/293). In particular,
the release flag on javac has changed from -release to --release. This
commit adapts the build process to this change.

Relates #20420
This commit is contained in:
Jason Tedor 2016-09-12 10:53:32 -04:00 committed by GitHub
parent 82fd95fd24
commit 3b90906f4f
1 changed files with 2 additions and 2 deletions

View File

@ -405,9 +405,9 @@ class BuildPlugin implements Plugin<Project> {
//options.incremental = true
if (project.javaVersion == JavaVersion.VERSION_1_9) {
// hack until gradle supports java 9's new "-release" arg
// hack until gradle supports java 9's new "--release" arg
assert minimumJava == JavaVersion.VERSION_1_8
options.compilerArgs << '-release' << '8'
options.compilerArgs << '--release' << '8'
project.sourceCompatibility = null
project.targetCompatibility = null
}