From 4bf0080b25b2a9c3550fbc6ff7e305be5841e389 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 9 May 2022 10:23:59 +0000 Subject: [PATCH] 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 --- java/androidmk.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/androidmk.go b/java/androidmk.go index f6ea6a930..439b1d123 100644 --- a/java/androidmk.go +++ b/java/androidmk.go @@ -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,