Revert "Target Java 17"

This reverts commit d6be9e51ca.

Reason for revert: b/267608166.

Change-Id: Ie07caa5ace3bcb290829e6fa476c5e1d47b975ba
Fixed: 267608166
This commit is contained in:
Sorin Basca
2023-02-02 17:56:19 +00:00
committed by Gerrit Code Review
parent d6be9e51ca
commit 384250c7c4
3 changed files with 18 additions and 4 deletions

View File

@@ -510,8 +510,14 @@ func getJavaVersion(ctx android.ModuleContext, javaVersion string, sdkContext an
return normalizeJavaVersion(ctx, javaVersion)
} else if ctx.Device() {
return defaultJavaLanguageVersion(ctx, sdkContext.SdkVersion(ctx))
} else {
} else if ctx.Config().TargetsJava17() {
// Temporary experimental flag to be able to try and build with
// java version 17 options. The flag, if used, just sets Java
// 17 as the default version, leaving any components that
// target an older version intact.
return JAVA_VERSION_17
} else {
return JAVA_VERSION_11
}
}