Merge "Revert "Default to building with OpenJDK 9 -target 1.8.""
am: c7efdd9b36
Change-Id: Icdbace15dcd4cc5f337b575e98db6265fdf967f2
This commit is contained in:
commit
38f7173524
2 changed files with 3 additions and 15 deletions
|
@ -295,10 +295,7 @@ func NewConfig(srcDir, buildDir string) (Config, error) {
|
|||
func (c *config) fromEnv() error {
|
||||
switch c.Getenv("EXPERIMENTAL_USE_OPENJDK9") {
|
||||
case "":
|
||||
if c.Getenv("RUN_ERROR_PRONE") != "true" {
|
||||
// Use OpenJDK9, but target 1.8
|
||||
c.useOpenJDK9 = true
|
||||
}
|
||||
// Use OpenJDK8
|
||||
case "false":
|
||||
// Use OpenJDK8
|
||||
case "1.8":
|
||||
|
@ -309,7 +306,7 @@ func (c *config) fromEnv() error {
|
|||
c.useOpenJDK9 = true
|
||||
c.targetOpenJDK9 = true
|
||||
default:
|
||||
return fmt.Errorf(`Invalid value for EXPERIMENTAL_USE_OPENJDK9, should be "", "false", "1.8", or "true"`)
|
||||
return fmt.Errorf(`Invalid value for EXPERIMENTAL_USE_OPENJDK9, should be "", "1.8", or "true"`)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -150,16 +150,7 @@ func NewConfig(ctx Context, args ...string) Config {
|
|||
if override, ok := ret.environ.Get("OVERRIDE_ANDROID_JAVA_HOME"); ok {
|
||||
return override
|
||||
}
|
||||
v, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK9")
|
||||
if !ok {
|
||||
v2, ok2 := ret.environ.Get("RUN_ERROR_PRONE")
|
||||
if ok2 && (v2 == "true") {
|
||||
v = "false"
|
||||
} else {
|
||||
v = "1.8"
|
||||
}
|
||||
}
|
||||
if v != "false" {
|
||||
if v, ok := ret.environ.Get("EXPERIMENTAL_USE_OPENJDK9"); ok && v != "" && v != "false" {
|
||||
return filepath.Join("prebuilts/jdk/jdk9", ret.HostPrebuiltTag())
|
||||
}
|
||||
return filepath.Join("prebuilts/jdk/jdk8", ret.HostPrebuiltTag())
|
||||
|
|
Loading…
Reference in a new issue