You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by ke...@apache.org on 2018/08/05 18:27:52 UTC
groovy git commit: add support for JDK 10 and JDK 11 targets (closes
#777)
Repository: groovy
Updated Branches:
refs/heads/master 0efb2274c -> 4397bfb42
add support for JDK 10 and JDK 11 targets (closes #777)
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/4397bfb4
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/4397bfb4
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/4397bfb4
Branch: refs/heads/master
Commit: 4397bfb42b8f180f533f397599bbcb02b1095de5
Parents: 0efb227
Author: Keegan Witt <ke...@gmail.com>
Authored: Wed Aug 1 00:32:30 2018 -0400
Committer: Keegan Witt <ke...@gmail.com>
Committed: Sun Aug 5 14:26:27 2018 -0400
----------------------------------------------------------------------
.../codehaus/groovy/control/CompilerConfiguration.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/groovy/blob/4397bfb4/src/main/java/org/codehaus/groovy/control/CompilerConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/control/CompilerConfiguration.java b/src/main/java/org/codehaus/groovy/control/CompilerConfiguration.java
index c6e6225..87402aa 100644
--- a/src/main/java/org/codehaus/groovy/control/CompilerConfiguration.java
+++ b/src/main/java/org/codehaus/groovy/control/CompilerConfiguration.java
@@ -61,6 +61,10 @@ public class CompilerConfiguration {
public static final String JDK8 = "1.8";
/** This (<code>"9"</code>) is the value for targetBytecode to compile for a JDK 9. **/
public static final String JDK9 = "9";
+ /** This (<code>"10"</code>) is the value for targetBytecode to compile for a JDK 10. **/
+ public static final String JDK10 = "10";
+ /** This (<code>"11"</code>) is the value for targetBytecode to compile for a JDK 11. **/
+ public static final String JDK11 = "11";
/** This (<code>"1.5"</code>) is the value for targetBytecode to compile for a JDK 1.5 or later JVM. **/
public static final String POST_JDK5 = JDK5; // for backwards compatibility
@@ -76,7 +80,9 @@ public class CompilerConfiguration {
JDK6, Opcodes.V1_6,
JDK7, Opcodes.V1_7,
JDK8, Opcodes.V1_8,
- JDK9, Opcodes.V9
+ JDK9, Opcodes.V9,
+ JDK10, Opcodes.V10,
+ JDK11, Opcodes.V11
);
/** An array of the valid targetBytecode values **/
@@ -389,7 +395,7 @@ public class CompilerConfiguration {
* Checks if the specified bytecode version string represents a JDK 1.8+ compatible
* bytecode version.
* @param bytecodeVersion The parameter can take one of the values in {@link #ALLOWED_JDKS}.
- * @return true if the bytecode version is JDK 1.87+
+ * @return true if the bytecode version is JDK 1.8+
*/
public static boolean isPostJDK8(String bytecodeVersion) {
return new BigDecimal(bytecodeVersion).compareTo(new BigDecimal(JDK8)) >= 0;