Set Java version for java_api_library module

Currently, stubs are compiled with Java version 1.8.
To align with this, set the java version passed to javac invocation as
1.8 for java_api_library module. Helper function is used to sync the
java version of droiddoc module and java_api_library module.

Test: m
Change-Id: I103b94aed9747a2f2dd65d13de0ae9c0f33db5c0
This commit is contained in:
Jihoon Kang
2022-12-22 21:26:06 +00:00
parent 5482a833d1
commit ff878bf121
2 changed files with 7 additions and 1 deletions

View File

@@ -598,7 +598,7 @@ func (d *Droiddoc) doclavaDocsFlags(ctx android.ModuleContext, cmd *android.Rule
// Droiddoc always gets "-source 1.8" because it doesn't support 1.9 sources. For modules with 1.9
// sources, droiddoc will get sources produced by metalava which will have already stripped out the
// 1.9 language features.
cmd.FlagWithArg("-source ", "1.8").
cmd.FlagWithArg("-source ", getStubsJavaVersion().String()).
Flag("-J-Xmx1600m").
Flag("-J-XX:-OmitStackTraceInFastThrow").
Flag("-XDignore.symbol.file").