Implicitly bump up Java target to 1.8
Bug: 320294595
Test: m
Change-Id: I693e564c67d17254d68f3a9c16664c1da93b9488
diff --git a/java/java.go b/java/java.go
index 4eeded3..a32ede5 100644
--- a/java/java.go
+++ b/java/java.go
@@ -564,9 +564,11 @@
func (v javaVersion) String() string {
switch v {
case JAVA_VERSION_6:
- return "1.6"
+ // Java version 1.6 no longer supported, bumping to 1.8
+ return "1.8"
case JAVA_VERSION_7:
- return "1.7"
+ // Java version 1.7 no longer supported, bumping to 1.8
+ return "1.8"
case JAVA_VERSION_8:
return "1.8"
case JAVA_VERSION_9:
@@ -583,10 +585,12 @@
func (v javaVersion) StringForKotlinc() string {
// $ ./external/kotlinc/bin/kotlinc -jvm-target foo
// error: unknown JVM target version: foo
- // Supported versions: 1.6, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17
+ // Supported versions: 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17
switch v {
+ case JAVA_VERSION_6:
+ return "1.8"
case JAVA_VERSION_7:
- return "1.6"
+ return "1.8"
case JAVA_VERSION_9:
return "9"
default:
@@ -602,9 +606,11 @@
func normalizeJavaVersion(ctx android.BaseModuleContext, javaVersion string) javaVersion {
switch javaVersion {
case "1.6", "6":
- return JAVA_VERSION_6
+ // Java version 1.6 no longer supported, bumping to 1.8
+ return JAVA_VERSION_8
case "1.7", "7":
- return JAVA_VERSION_7
+ // Java version 1.7 no longer supported, bumping to 1.8
+ return JAVA_VERSION_8
case "1.8", "8":
return JAVA_VERSION_8
case "1.9", "9":