Adding option to include sources only for Java 11 builds

Bug: 207852002
Test: m
Test: EXPERIMENTAL_TARGET_JAVA_VERSION_11=true m
Change-Id: I554a79798ea7f1dd4a96b09f761090f83a009cb4
This commit is contained in:
Sorin Basca
2021-12-20 11:51:24 +00:00
parent f1228f570a
commit 9347ae3ba0
5 changed files with 24 additions and 2 deletions

View File

@@ -449,7 +449,7 @@ func getJavaVersion(ctx android.ModuleContext, javaVersion string, sdkContext an
return normalizeJavaVersion(ctx, javaVersion)
} else if ctx.Device() {
return defaultJavaLanguageVersion(ctx, sdkContext.SdkVersion(ctx))
} else if ctx.Config().IsEnvTrue("EXPERIMENTAL_TARGET_JAVA_VERSION_11") {
} else if ctx.Config().TargetsJava11() {
// Temporary experimental flag to be able to try and build with
// java version 11 options. The flag, if used, just sets Java
// 11 as the default version, leaving any components that