Write AndroidMk for api-versions.xml module

Soong does not write AndroidMk output if the default outputfile is
invalid. The default output file for droidstubs modules is the srcjar,
but not all droidstubs modules have srcjars. Make it also write
AndroidMk entries for droidstubs that only have an api-versions.xml
output.

A similar exception already existed for the api txt files, so use the
same mechanism.

Bug: 187398174
Test: m nothing && grep Android-${TARGET_PRODUCT}.mk
Change-Id: I5cbcf42d877ca166d172b727c0aa2bdf6d9af744
This commit is contained in:
Anton Hansson
2022-05-09 10:23:59 +00:00
parent b8f3f18c15
commit 4bf0080b25

View File

@@ -542,6 +542,9 @@ func (dstubs *Droidstubs) AndroidMkEntries() []android.AndroidMkEntries {
if !outputFile.Valid() {
outputFile = android.OptionalPathForPath(dstubs.apiFile)
}
if !outputFile.Valid() {
outputFile = android.OptionalPathForPath(dstubs.apiVersionsXml)
}
return []android.AndroidMkEntries{android.AndroidMkEntries{
Class: "JAVA_LIBRARIES",
OutputFile: outputFile,