summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-01-16 18:09:41 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-01-16 18:09:41 +0000
commitce8d254149c2ff1c966cd31a0036e4a1addea79a (patch)
treef9198ef868e6ee2847ad08e4080af9751ab0cd3c /java/java.go
parente317b15cea1371015f128630969288111d13eb76 (diff)
parentd567a514eeb3bec74cd3ff3a13f32613418830a2 (diff)
Merge "Implicitly bump up Java target to 1.8" into main
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/java/java.go b/java/java.go
index c5a414250..72c39ef38 100644
--- a/java/java.go
+++ b/java/java.go
@@ -564,9 +564,11 @@ const (
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) String() string {
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 (v javaVersion) usesJavaModules() bool {
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":