From f059b2f2fce64807c6855c1e57300444b6bb0f00 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 1 Nov 2023 13:57:09 -0700 Subject: [PATCH] Remove obsolete java version environment variables jdk9 and jdk11 are no longer used, remove ANDROID_JAVA9_HOME and ANDROID_JAVA11_HOME. Bug: 221270882 Test: treehugger Change-Id: Iad566bff21055c5e2acd62642ccd579507e21fef --- java/config/makevars.go | 2 -- ui/build/config.go | 4 ---- 2 files changed, 6 deletions(-) diff --git a/java/config/makevars.go b/java/config/makevars.go index 4e0919537..649b6c58f 100644 --- a/java/config/makevars.go +++ b/java/config/makevars.go @@ -34,8 +34,6 @@ func makeVarsProvider(ctx android.MakeVarsContext) { ctx.Strict("ANDROID_JAVA_HOME", "${JavaHome}") ctx.Strict("ANDROID_JAVA8_HOME", "prebuilts/jdk/jdk8/${hostPrebuiltTag}") - ctx.Strict("ANDROID_JAVA9_HOME", "prebuilts/jdk/jdk9/${hostPrebuiltTag}") - ctx.Strict("ANDROID_JAVA11_HOME", "prebuilts/jdk/jdk11/${hostPrebuiltTag}") ctx.Strict("ANDROID_JAVA_TOOLCHAIN", "${JavaToolchain}") ctx.Strict("JAVA", "${JavaCmd} ${JavaVmFlags}") ctx.Strict("JAVAC", "${JavacCmd} ${JavacVmFlags}") diff --git a/ui/build/config.go b/ui/build/config.go index 833688436..8d6c3b7a8 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -385,8 +385,6 @@ func NewConfig(ctx Context, args ...string) Config { // Configure Java-related variables, including adding it to $PATH java8Home := filepath.Join("prebuilts/jdk/jdk8", ret.HostPrebuiltTag()) - java9Home := filepath.Join("prebuilts/jdk/jdk9", ret.HostPrebuiltTag()) - java11Home := filepath.Join("prebuilts/jdk/jdk11", ret.HostPrebuiltTag()) java17Home := filepath.Join("prebuilts/jdk/jdk17", ret.HostPrebuiltTag()) javaHome := func() string { if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok { @@ -413,8 +411,6 @@ func NewConfig(ctx Context, args ...string) Config { ret.environ.Set("JAVA_HOME", absJavaHome) ret.environ.Set("ANDROID_JAVA_HOME", javaHome) ret.environ.Set("ANDROID_JAVA8_HOME", java8Home) - ret.environ.Set("ANDROID_JAVA9_HOME", java9Home) - ret.environ.Set("ANDROID_JAVA11_HOME", java11Home) ret.environ.Set("PATH", strings.Join(newPath, string(filepath.ListSeparator))) // b/286885495, https://bugzilla.redhat.com/show_bug.cgi?id=2227130: some versions of Fedora include patches