Don't require merge_annotations_dir for annotations_enabled
As far as I can tell, annotations_enabled does not require use of
merge_annotations_dir (although it may have done in the past).
Bug: 157010342
Test: m
Change-Id: I6705522774203b4566f58679bbc2f0c17422c1dd
diff --git a/java/droiddoc.go b/java/droiddoc.go
index 62a6661..4b4a245 100644
--- a/java/droiddoc.go
+++ b/java/droiddoc.go
@@ -1308,13 +1308,10 @@
d.annotationsZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"_annotations.zip")
cmd.FlagWithOutput("--extract-annotations ", d.annotationsZip)
- if len(d.properties.Merge_annotations_dirs) == 0 {
- ctx.PropertyErrorf("merge_annotations_dirs",
- "has to be non-empty if annotations was enabled!")
+ if len(d.properties.Merge_annotations_dirs) != 0 {
+ d.mergeAnnoDirFlags(ctx, cmd)
}
- d.mergeAnnoDirFlags(ctx, cmd)
-
// TODO(tnorbye): find owners to fix these warnings when annotation was enabled.
cmd.FlagWithArg("--hide ", "HiddenTypedefConstant").
FlagWithArg("--hide ", "SuperfluousPrefix").