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

@@ -55,7 +55,7 @@ func defaultJavaLanguageVersion(ctx android.EarlyModuleContext, s android.SdkSpe
return JAVA_VERSION_7
} else if sdk.FinalOrFutureInt() <= 29 {
return JAVA_VERSION_8
} 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