aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Gillin2019-05-20 09:44:53 -0500
committerPete Gillin2019-05-20 09:48:19 -0500
commit9c640141029341d0b604ef17cdc3468cb05fc59b (patch)
treea4989036df0e04ee12f9fc620538cb466bb34a08
parent42e862c56d9bb34b72fad9fef52de61ece04322f (diff)
downloadplatform-build-soong-9c640141029341d0b604ef17cdc3468cb05fc59b.tar.gz
platform-build-soong-9c640141029341d0b604ef17cdc3468cb05fc59b.tar.xz
platform-build-soong-9c640141029341d0b604ef17cdc3468cb05fc59b.zip
Avoid targeting Java 9 for targets with SDK version up to 29.
Targets with sdk_version values up to and including 29 should not use Java language level 9, even if EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true is set. This change fixes a downstream issue. Bug: 131678633 Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make droid tests docs cts java Test: (same test in downstream branch) Change-Id: Ic58e8df2e06d6e07bc42255314521831dc41b239
-rw-r--r--java/java.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index e764ec30..db43c43a 100644
--- a/java/java.go
+++ b/java/java.go
@@ -854,7 +854,7 @@ func getJavaVersion(ctx android.ModuleContext, javaVersion string, sdkContext sd
854 ret = javaVersion 854 ret = javaVersion
855 } else if ctx.Device() && sdk <= 23 { 855 } else if ctx.Device() && sdk <= 23 {
856 ret = "1.7" 856 ret = "1.7"
857 } else if ctx.Device() && sdk <= 28 || !ctx.Config().TargetOpenJDK9() { 857 } else if ctx.Device() && sdk <= 29 || !ctx.Config().TargetOpenJDK9() {
858 ret = "1.8" 858 ret = "1.8"
859 } else if ctx.Device() && sdkContext.sdkVersion() != "" && sdk == android.FutureApiLevel { 859 } else if ctx.Device() && sdkContext.sdkVersion() != "" && sdk == android.FutureApiLevel {
860 // TODO(ccross): once we generate stubs we should be able to use 1.9 for sdk_version: "current" 860 // TODO(ccross): once we generate stubs we should be able to use 1.9 for sdk_version: "current"