[java9] Add "--dex-api" option to Metalava.

This allow Metalava to generate public-dex file when user specify
dex_api_filename.

This blocks how we try java9 for droiddoc since "hiddenapi-lists-docs"
targets depends on libcore sources.

Test: m -j hiddenapi-lists-docs
Bug: b/78245848

Change-Id: Ic847c1123b14afb599dbf2a588885fd36e56b2cc
Merged-In: Ic847c1123b14afb599dbf2a588885fd36e56b2cc
This commit is contained in:
Nan Zhang 2018-08-21 16:24:38 -07:00
parent 4b42edbca0
commit aa43b94107
1 changed files with 1 additions and 0 deletions

View File

@ -904,6 +904,7 @@ func (d *Droiddoc) collectStubsFlags(ctx android.ModuleContext, implicitOutputs
if String(d.properties.Dex_api_filename) != "" {
d.dexApiFile = android.PathForModuleOut(ctx, String(d.properties.Dex_api_filename))
doclavaFlags += " -dexApi " + d.dexApiFile.String()
MetalavaFlags += " --dex-api " + d.dexApiFile.String()
*implicitOutputs = append(*implicitOutputs, d.dexApiFile)
}