Adding configuration support for Java 11
Bug: 195387073
Test: m
Change-Id: Ibf26f35b83b300acacae800f9962a00916869412
diff --git a/java/java.go b/java/java.go
index 2f9e03a..ee1fd8a 100644
--- a/java/java.go
+++ b/java/java.go
@@ -447,6 +447,7 @@
JAVA_VERSION_7 = 7
JAVA_VERSION_8 = 8
JAVA_VERSION_9 = 9
+ JAVA_VERSION_11 = 11
)
func (v javaVersion) String() string {
@@ -459,6 +460,8 @@
return "1.8"
case JAVA_VERSION_9:
return "1.9"
+ case JAVA_VERSION_11:
+ return "11"
default:
return "unsupported"
}
@@ -479,8 +482,10 @@
return JAVA_VERSION_8
case "1.9", "9":
return JAVA_VERSION_9
- case "10", "11":
- ctx.PropertyErrorf("java_version", "Java language levels above 9 are not supported")
+ case "11":
+ return JAVA_VERSION_11
+ case "10":
+ ctx.PropertyErrorf("java_version", "Java language levels 10 is not supported")
return JAVA_VERSION_UNSUPPORTED
default:
ctx.PropertyErrorf("java_version", "Unrecognized Java language level")