Add support for dumping proguard api file.
Test: ref go/ag/4783442
Bug: b/70351683
Change-Id: I0aedd41686535c9a662b935003b80634e56663e0
Merged-In: I0aedd41686535c9a662b935003b80634e56663e0
(cherry-picked from commit: 26c055258b
)
This commit is contained in:
parent
158f2d9eaf
commit
66dc236781
|
@ -379,6 +379,9 @@ func (ddoc *Droiddoc) AndroidMk() android.AndroidMkData {
|
|||
if ddoc.exactApiFile != nil {
|
||||
fmt.Fprintln(w, apiFilePrefix+"EXACT_API_FILE := ", ddoc.exactApiFile.String())
|
||||
}
|
||||
if ddoc.proguardFile != nil {
|
||||
fmt.Fprintln(w, apiFilePrefix+"PROGUARD_FILE := ", ddoc.proguardFile.String())
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -244,6 +244,9 @@ type DroiddocProperties struct {
|
|||
// the generated exact API filename by Doclava.
|
||||
Exact_api_filename *string
|
||||
|
||||
// the generated proguard filename by Doclava.
|
||||
Proguard_filename *string
|
||||
|
||||
// if set to false, don't allow droiddoc to generate stubs source files. Defaults to true.
|
||||
Create_stubs *bool
|
||||
|
||||
|
@ -606,6 +609,7 @@ type Droiddoc struct {
|
|||
removedDexApiFile android.WritablePath
|
||||
exactApiFile android.WritablePath
|
||||
apiMappingFile android.WritablePath
|
||||
proguardFile android.WritablePath
|
||||
|
||||
checkCurrentApiTimestamp android.WritablePath
|
||||
updateCurrentApiTimestamp android.WritablePath
|
||||
|
@ -712,7 +716,8 @@ func (d *Droiddoc) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||
}
|
||||
}
|
||||
|
||||
func (d *Droiddoc) initBuilderFlags(ctx android.ModuleContext, implicits *android.Paths, deps deps) (droiddocBuilderFlags, error) {
|
||||
func (d *Droiddoc) initBuilderFlags(ctx android.ModuleContext, implicits *android.Paths,
|
||||
deps deps) (droiddocBuilderFlags, error) {
|
||||
var flags droiddocBuilderFlags
|
||||
|
||||
*implicits = append(*implicits, deps.bootClasspath...)
|
||||
|
@ -912,6 +917,13 @@ func (d *Droiddoc) collectStubsFlags(ctx android.ModuleContext, implicitOutputs
|
|||
*implicitOutputs = append(*implicitOutputs, d.apiMappingFile)
|
||||
}
|
||||
|
||||
if String(d.properties.Proguard_filename) != "" {
|
||||
d.proguardFile = android.PathForModuleOut(ctx, String(d.properties.Proguard_filename))
|
||||
doclavaFlags += " -proguard " + d.proguardFile.String()
|
||||
// Omitted: metalava support
|
||||
*implicitOutputs = append(*implicitOutputs, d.proguardFile)
|
||||
}
|
||||
|
||||
if BoolDefault(d.properties.Create_stubs, true) {
|
||||
doclavaFlags += " -stubs " + android.PathForModuleOut(ctx, "stubsDir").String()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue