summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Jingwen Chen <jingwen@google.com> 2020-08-10 05:22:24 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-08-10 05:22:24 +0000
commitfc16b6684ee715dd5318f9dee7533c365765dcd6 (patch)
tree98df8f14a216647e05fa32b550d76254cac68289 /java
parent6df337255c2e889e1f8db84f098a6c297d7ac90d (diff)
parent7b27ca7dadcf5b14524e400717db664bc2006817 (diff)
Merge "Fix droiddoc disting when WITHOUT_CHECK_API is true."
Diffstat (limited to 'java')
-rw-r--r--java/androidmk.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/java/androidmk.go b/java/androidmk.go
index 650d12661..bc327cf68 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -559,15 +559,21 @@ func (dstubs *Droidstubs) AndroidMkEntries() []android.AndroidMkEntries {
// are created in make if only the api txt file is being generated. This is
// needed because an invalid output file would prevent the make entries from
// being written.
+ //
+ // Note that dstubs.apiFile can be also be nil if WITHOUT_CHECKS_API is true.
// TODO(b/146727827): Revert when we do not need to generate stubs and API separately.
- distFile := dstubs.apiFile
+
+ var distFiles android.TaggedDistFiles
+ if dstubs.apiFile != nil {
+ distFiles = android.MakeDefaultDistFiles(dstubs.apiFile)
+ }
outputFile := android.OptionalPathForPath(dstubs.stubsSrcJar)
if !outputFile.Valid() {
- outputFile = android.OptionalPathForPath(distFile)
+ outputFile = android.OptionalPathForPath(dstubs.apiFile)
}
return []android.AndroidMkEntries{android.AndroidMkEntries{
Class: "JAVA_LIBRARIES",
- DistFiles: android.MakeDefaultDistFiles(distFile),
+ DistFiles: distFiles,
OutputFile: outputFile,
Include: "$(BUILD_SYSTEM)/soong_droiddoc_prebuilt.mk",
ExtraEntries: []android.AndroidMkExtraEntriesFunc{