Merge "Switch to an OpenJDK 11 toolchain by default."

This commit is contained in:
Pete Gillin 2019-11-07 11:13:39 +00:00 committed by Gerrit Code Review
commit 72813feb12
2 changed files with 6 additions and 6 deletions

View file

@ -88,10 +88,10 @@ func init() {
})
pctx.VariableFunc("JlinkVersion", func(ctx android.PackageVarContext) string {
switch ctx.Config().Getenv("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN") {
case "true":
return "11"
default:
case "false":
return "9"
default:
return "11"
}
})

View file

@ -219,10 +219,10 @@ func NewConfig(ctx Context, args ...string) Config {
if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok {
return override
}
if toolchain11, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN"); ok && toolchain11 == "true" {
return java11Home
}
if toolchain9, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN"); ok && toolchain9 == "false" {
return java9Home
}
return java11Home
}()
absJavaHome := absPath(ctx, javaHome)