Revert "Reland "Target Java 17""

This reverts commit 1fbf7f21a4.

Reason for revert: broke docker image, pinning is incomplete it seems

Change-Id: I7102cb233a4fe5ce0f5a1ead98cfc661c3d82ce5
This commit is contained in:
Julien Desprez
2023-02-14 20:26:31 +00:00
committed by Gerrit Code Review
parent 1fbf7f21a4
commit 91ba6c7e01
3 changed files with 18 additions and 4 deletions

View File

@@ -57,10 +57,14 @@ func defaultJavaLanguageVersion(ctx android.EarlyModuleContext, s android.SdkSpe
return JAVA_VERSION_8
} else if sdk.FinalOrFutureInt() <= 31 {
return JAVA_VERSION_9
} else if sdk.FinalOrFutureInt() <= 32 {
return JAVA_VERSION_11
} 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
}
}