Loading android/config.go +5 −5 Original line number Diff line number Diff line Loading @@ -369,14 +369,14 @@ func NewConfig(srcDir, buildDir string) (Config, error) { } func (c *config) fromEnv() error { switch c.Getenv("EXPERIMENTAL_USE_OPENJDK9") { case "", "1.8": // Nothing, we always use OpenJDK9 switch c.Getenv("EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9") { case "": // Nothing, this is the default case "true": // Use OpenJDK9 and target 1.9 // Use -source 9 -target 9 c.targetOpenJDK9 = true default: return fmt.Errorf(`Invalid value for EXPERIMENTAL_USE_OPENJDK9, should be "", "1.8", or "true"`) return fmt.Errorf(`Invalid value for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9, should be "" or "true"`) } return nil Loading java/java_test.go +5 −5 Original line number Diff line number Diff line Loading @@ -1007,8 +1007,8 @@ func TestPatchModule(t *testing.T) { } ` t.Run("1.8", func(t *testing.T) { // Test default javac 1.8 t.Run("Java language level 8", func(t *testing.T) { // Test default javac -source 1.8 -target 1.8 ctx := testJava(t, bp) checkPatchModuleFlag(t, ctx, "foo", "") Loading @@ -1016,9 +1016,9 @@ func TestPatchModule(t *testing.T) { checkPatchModuleFlag(t, ctx, "baz", "") }) t.Run("1.9", func(t *testing.T) { // Test again with javac 1.9 config := testConfig(map[string]string{"EXPERIMENTAL_USE_OPENJDK9": "true"}) t.Run("Java language level 9", func(t *testing.T) { // Test again with javac -source 9 -target 9 config := testConfig(map[string]string{"EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9": "true"}) ctx := testContext(config, bp, nil) run(t, ctx, config) Loading java/sdk_test.go +5 −5 Original line number Diff line number Diff line Loading @@ -272,8 +272,8 @@ func TestClasspath(t *testing.T) { } } t.Run("1.8", func(t *testing.T) { // Test default javac 1.8 t.Run("Java language level 8", func(t *testing.T) { // Test default javac -source 1.8 -target 1.8 config := testConfig(nil) if testcase.unbundled { config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) Loading @@ -299,9 +299,9 @@ func TestClasspath(t *testing.T) { } }) // Test again with javac 1.9 t.Run("1.9", func(t *testing.T) { config := testConfig(map[string]string{"EXPERIMENTAL_USE_OPENJDK9": "true"}) // Test again with javac -source 9 -target 9 t.Run("Java language level 9", func(t *testing.T) { config := testConfig(map[string]string{"EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9": "true"}) if testcase.unbundled { config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) } Loading Loading
android/config.go +5 −5 Original line number Diff line number Diff line Loading @@ -369,14 +369,14 @@ func NewConfig(srcDir, buildDir string) (Config, error) { } func (c *config) fromEnv() error { switch c.Getenv("EXPERIMENTAL_USE_OPENJDK9") { case "", "1.8": // Nothing, we always use OpenJDK9 switch c.Getenv("EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9") { case "": // Nothing, this is the default case "true": // Use OpenJDK9 and target 1.9 // Use -source 9 -target 9 c.targetOpenJDK9 = true default: return fmt.Errorf(`Invalid value for EXPERIMENTAL_USE_OPENJDK9, should be "", "1.8", or "true"`) return fmt.Errorf(`Invalid value for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9, should be "" or "true"`) } return nil Loading
java/java_test.go +5 −5 Original line number Diff line number Diff line Loading @@ -1007,8 +1007,8 @@ func TestPatchModule(t *testing.T) { } ` t.Run("1.8", func(t *testing.T) { // Test default javac 1.8 t.Run("Java language level 8", func(t *testing.T) { // Test default javac -source 1.8 -target 1.8 ctx := testJava(t, bp) checkPatchModuleFlag(t, ctx, "foo", "") Loading @@ -1016,9 +1016,9 @@ func TestPatchModule(t *testing.T) { checkPatchModuleFlag(t, ctx, "baz", "") }) t.Run("1.9", func(t *testing.T) { // Test again with javac 1.9 config := testConfig(map[string]string{"EXPERIMENTAL_USE_OPENJDK9": "true"}) t.Run("Java language level 9", func(t *testing.T) { // Test again with javac -source 9 -target 9 config := testConfig(map[string]string{"EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9": "true"}) ctx := testContext(config, bp, nil) run(t, ctx, config) Loading
java/sdk_test.go +5 −5 Original line number Diff line number Diff line Loading @@ -272,8 +272,8 @@ func TestClasspath(t *testing.T) { } } t.Run("1.8", func(t *testing.T) { // Test default javac 1.8 t.Run("Java language level 8", func(t *testing.T) { // Test default javac -source 1.8 -target 1.8 config := testConfig(nil) if testcase.unbundled { config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) Loading @@ -299,9 +299,9 @@ func TestClasspath(t *testing.T) { } }) // Test again with javac 1.9 t.Run("1.9", func(t *testing.T) { config := testConfig(map[string]string{"EXPERIMENTAL_USE_OPENJDK9": "true"}) // Test again with javac -source 9 -target 9 t.Run("Java language level 9", func(t *testing.T) { config := testConfig(map[string]string{"EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9": "true"}) if testcase.unbundled { config.TestProductVariables.Unbundled_build = proptools.BoolPtr(true) } Loading