From 8eac0005c6511bae967cd4fde1612315c49673c9 Mon Sep 17 00:00:00 2001 From: Sorin Basca Date: Fri, 22 Jul 2022 17:24:02 +0100 Subject: [PATCH] Use the toolchain from JDK 17 Bug: 233029164 Test: m Change-Id: I3375bd4e4186c0049490ee3ddc0f85552d25b579 --- java/config/config.go | 7 +------ ui/build/config.go | 8 ++++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/java/config/config.go b/java/config/config.go index ea44aaa08..a84c315d5 100644 --- a/java/config/config.go +++ b/java/config/config.go @@ -132,12 +132,7 @@ func init() { if override := ctx.Config().Getenv("OVERRIDE_JLINK_VERSION_NUMBER"); override != "" { return override } - switch ctx.Config().Getenv("EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN") { - case "true": - return "17" - default: - return "11" - } + return "17" }) pctx.SourcePathVariable("JavaToolchain", "${JavaHome}/bin") diff --git a/ui/build/config.go b/ui/build/config.go index 14a99d080..15eea2d53 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -387,13 +387,13 @@ func NewConfig(ctx Context, args ...string) Config { if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok { return override } - if ret.environ.IsEnvTrue("EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN") { - return java17Home - } 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 + if toolchain17, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN"); ok && toolchain17 != "true" { + ctx.Fatalln("The environment variable EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN is no longer supported. An OpenJDK 17 toolchain is now the global default.") + } + return java17Home }() absJavaHome := absPath(ctx, javaHome)