Merge "Avoid targeting Java 9 for targets with SDK version up to 29."

am: 3f3a70c0ec

Change-Id: I743c7d86c92085091ec1e0c1919ce2859cb48467
This commit is contained in:
Pete Gillin 2019-05-21 03:35:09 -07:00 committed by android-build-merger
commit 4494c12c46

View file

@ -854,7 +854,7 @@ func getJavaVersion(ctx android.ModuleContext, javaVersion string, sdkContext sd
ret = javaVersion ret = javaVersion
} else if ctx.Device() && sdk <= 23 { } else if ctx.Device() && sdk <= 23 {
ret = "1.7" ret = "1.7"
} else if ctx.Device() && sdk <= 28 || !ctx.Config().TargetOpenJDK9() { } else if ctx.Device() && sdk <= 29 || !ctx.Config().TargetOpenJDK9() {
ret = "1.8" ret = "1.8"
} else if ctx.Device() && sdkContext.sdkVersion() != "" && sdk == android.FutureApiLevel { } else if ctx.Device() && sdkContext.sdkVersion() != "" && sdk == android.FutureApiLevel {
// TODO(ccross): once we generate stubs we should be able to use 1.9 for sdk_version: "current" // TODO(ccross): once we generate stubs we should be able to use 1.9 for sdk_version: "current"