Support new Doclava flag
CL I5f92a54d718749f8ddef9472f3b6387a3debd385 adds a new "-dexApi" flag to Doclava, which generates the public API as a list of Dex signatures. Add support for this flag to Soong and expose it in the droiddoc rule. Bug: 80461842 Bug: 64382372 Test: make out/target/common/obj/PACKAGING/hiddenapi-blacklist.txt Change-Id: Iadf09f17bb783209a6555ce5289c381bf025a01c
This commit is contained in:
@@ -333,6 +333,9 @@ func (ddoc *Droiddoc) AndroidMk() android.AndroidMkData {
|
|||||||
if ddoc.apiFile != nil {
|
if ddoc.apiFile != nil {
|
||||||
fmt.Fprintln(w, apiFilePrefix+"API_FILE := ", ddoc.apiFile.String())
|
fmt.Fprintln(w, apiFilePrefix+"API_FILE := ", ddoc.apiFile.String())
|
||||||
}
|
}
|
||||||
|
if ddoc.dexApiFile != nil {
|
||||||
|
fmt.Fprintln(w, apiFilePrefix+"DEX_API_FILE := ", ddoc.dexApiFile.String())
|
||||||
|
}
|
||||||
if ddoc.privateApiFile != nil {
|
if ddoc.privateApiFile != nil {
|
||||||
fmt.Fprintln(w, apiFilePrefix+"PRIVATE_API_FILE := ", ddoc.privateApiFile.String())
|
fmt.Fprintln(w, apiFilePrefix+"PRIVATE_API_FILE := ", ddoc.privateApiFile.String())
|
||||||
}
|
}
|
||||||
|
@@ -203,6 +203,9 @@ type DroiddocProperties struct {
|
|||||||
// the generated public API filename by Doclava.
|
// the generated public API filename by Doclava.
|
||||||
Api_filename *string
|
Api_filename *string
|
||||||
|
|
||||||
|
// the generated public Dex API filename by Doclava.
|
||||||
|
Dex_api_filename *string
|
||||||
|
|
||||||
// the generated private API filename by Doclava.
|
// the generated private API filename by Doclava.
|
||||||
Private_api_filename *string
|
Private_api_filename *string
|
||||||
|
|
||||||
@@ -266,6 +269,7 @@ type Droiddoc struct {
|
|||||||
|
|
||||||
properties DroiddocProperties
|
properties DroiddocProperties
|
||||||
apiFile android.WritablePath
|
apiFile android.WritablePath
|
||||||
|
dexApiFile android.WritablePath
|
||||||
privateApiFile android.WritablePath
|
privateApiFile android.WritablePath
|
||||||
privateDexApiFile android.WritablePath
|
privateDexApiFile android.WritablePath
|
||||||
removedApiFile android.WritablePath
|
removedApiFile android.WritablePath
|
||||||
@@ -753,6 +757,12 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
implicitOutputs = append(implicitOutputs, d.privateApiFile)
|
implicitOutputs = append(implicitOutputs, d.privateApiFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if String(d.properties.Dex_api_filename) != "" {
|
||||||
|
d.dexApiFile = android.PathForModuleOut(ctx, String(d.properties.Dex_api_filename))
|
||||||
|
args = args + " -dexApi " + d.dexApiFile.String()
|
||||||
|
implicitOutputs = append(implicitOutputs, d.dexApiFile)
|
||||||
|
}
|
||||||
|
|
||||||
if String(d.properties.Private_dex_api_filename) != "" {
|
if String(d.properties.Private_dex_api_filename) != "" {
|
||||||
d.privateDexApiFile = android.PathForModuleOut(ctx, String(d.properties.Private_dex_api_filename))
|
d.privateDexApiFile = android.PathForModuleOut(ctx, String(d.properties.Private_dex_api_filename))
|
||||||
args = args + " -privateDexApi " + d.privateDexApiFile.String()
|
args = args + " -privateDexApi " + d.privateDexApiFile.String()
|
||||||
|
Reference in New Issue
Block a user