Turn droiddoc's metalava_merge_annotations_dir into a list.
am: b13a015cee
Change-Id: I5551aeb25ff33719551d04fcd326e0bf47169ad6
This commit is contained in:
commit
690dfda955
|
@ -262,8 +262,8 @@ type DroiddocProperties struct {
|
|||
// is set to true, Metalava will allow framework SDK to contain annotations.
|
||||
Metalava_annotations_enabled *bool
|
||||
|
||||
// a top level directory contains XML files set to merge annotations.
|
||||
Metalava_merge_annotations_dir *string
|
||||
// a list of top-level directories containing files to merge annotations from.
|
||||
Metalava_merge_annotations_dirs []string
|
||||
}
|
||||
|
||||
type Javadoc struct {
|
||||
|
@ -970,14 +970,16 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||
d.annotationsZip = android.PathForModuleOut(ctx, ctx.ModuleName()+"_annotations.zip")
|
||||
implicitOutputs = append(implicitOutputs, d.annotationsZip)
|
||||
|
||||
if String(d.properties.Metalava_merge_annotations_dir) == "" {
|
||||
ctx.PropertyErrorf("metalava_merge_annotations",
|
||||
if len(d.properties.Metalava_merge_annotations_dirs) == 0 {
|
||||
ctx.PropertyErrorf("metalava_merge_annotations_dirs",
|
||||
"has to be non-empty if annotations was enabled!")
|
||||
}
|
||||
mergeAnnotationsDirs := android.PathsForSource(ctx, d.properties.Metalava_merge_annotations_dirs)
|
||||
|
||||
mergeAnnotationsDir := android.PathForSource(ctx, String(d.properties.Metalava_merge_annotations_dir))
|
||||
|
||||
opts += " --extract-annotations " + d.annotationsZip.String() + " --merge-annotations " + mergeAnnotationsDir.String()
|
||||
opts += " --extract-annotations " + d.annotationsZip.String()
|
||||
for _, mergeAnnotationsDir := range mergeAnnotationsDirs {
|
||||
opts += " --merge-annotations " + mergeAnnotationsDir.String()
|
||||
}
|
||||
// TODO(tnorbye): find owners to fix these warnings when annotation was enabled.
|
||||
opts += " --hide HiddenTypedefConstant --hide SuperfluousPrefix --hide AnnotationExtraction"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue