From a7a3d64a36bd0b6ab0ed4c34f5e4341aa4ebdf70 Mon Sep 17 00:00:00 2001 From: Pete Gillin Date: Thu, 7 Nov 2019 18:58:42 +0000 Subject: [PATCH] Remove the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN option. Previously, this setting environment variable to false reverted to an OpenJDK 9 toolchain. This change removes that option. Test: m core-all-system-modules Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*' Test: EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false m core-all-system-modules (fails) Bug: 131683177 Change-Id: I0d679648e1236925ce3ef7e1652379127e846b00 --- java/config/config.go | 7 +------ ui/build/config.go | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/java/config/config.go b/java/config/config.go index a795aad1c..333de32d6 100644 --- a/java/config/config.go +++ b/java/config/config.go @@ -90,12 +90,7 @@ func init() { if override := ctx.Config().Getenv("OVERRIDE_JLINK_VERSION_NUMBER"); override != "" { return override } - switch ctx.Config().Getenv("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN") { - case "false": - return "9" - default: - return "11" - } + return "11" }) pctx.SourcePathVariable("JavaToolchain", "${JavaHome}/bin") diff --git a/ui/build/config.go b/ui/build/config.go index 686ca3e76..92aee4d8a 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -219,8 +219,8 @@ func NewConfig(ctx Context, args ...string) Config { if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok { return override } - if toolchain9, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN"); ok && toolchain9 == "false" { - return java9Home + if toolchain11, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN"); ok && toolchain11 != "true" { + ctx.Fatalln("The environment variable EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN is no longer supported. An OpenJDK 11 toolchain is now the global default.") } return java11Home }()