From 3b90906f4f5a14d662b85b72d48d39f1d06cc709 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 12 Sep 2016 10:53:32 -0400 Subject: [PATCH] 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 --- .../main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy index 4d7bee866b8..7ccdbcee221 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy @@ -405,9 +405,9 @@ class BuildPlugin implements Plugin { //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 }