Merge "Move creation of paths into hiddenAPIGenerateCSV" am: 8705ba06bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1564637 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I58db0940c7f677b262424abca5519c8401b1804f
This commit is contained in:
@@ -108,11 +108,9 @@ func (h *hiddenAPI) hiddenAPI(ctx android.ModuleContext, name string, primary bo
|
|||||||
// not on the list then that will cause failures in the CtsHiddenApiBlacklist...
|
// not on the list then that will cause failures in the CtsHiddenApiBlacklist...
|
||||||
// tests.
|
// tests.
|
||||||
if inList(bootJarName, ctx.Config().BootJars()) {
|
if inList(bootJarName, ctx.Config().BootJars()) {
|
||||||
// Derive the greylist from classes jar.
|
// Create ninja rules to generate various CSV files needed by hiddenapi and store the paths
|
||||||
flagsCSV := android.PathForModuleOut(ctx, "hiddenapi", "flags.csv")
|
// in the hiddenAPI structure.
|
||||||
metadataCSV := android.PathForModuleOut(ctx, "hiddenapi", "metadata.csv")
|
h.hiddenAPIGenerateCSV(ctx, implementationJar)
|
||||||
indexCSV := android.PathForModuleOut(ctx, "hiddenapi", "index.csv")
|
|
||||||
h.hiddenAPIGenerateCSV(ctx, flagsCSV, metadataCSV, indexCSV, implementationJar)
|
|
||||||
|
|
||||||
// If this module is actually on the boot jars list and not providing
|
// If this module is actually on the boot jars list and not providing
|
||||||
// hiddenapi information for a module on the boot jars list then encode
|
// hiddenapi information for a module on the boot jars list then encode
|
||||||
@@ -136,9 +134,10 @@ func (h *hiddenAPI) hiddenAPI(ctx android.ModuleContext, name string, primary bo
|
|||||||
return dexJar
|
return dexJar
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *hiddenAPI) hiddenAPIGenerateCSV(ctx android.ModuleContext, flagsCSV, metadataCSV, indexCSV android.WritablePath, classesJar android.Path) {
|
func (h *hiddenAPI) hiddenAPIGenerateCSV(ctx android.ModuleContext, classesJar android.Path) {
|
||||||
stubFlagsCSV := hiddenAPISingletonPaths(ctx).stubFlags
|
stubFlagsCSV := hiddenAPISingletonPaths(ctx).stubFlags
|
||||||
|
|
||||||
|
flagsCSV := android.PathForModuleOut(ctx, "hiddenapi", "flags.csv")
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: hiddenAPIGenerateCSVRule,
|
Rule: hiddenAPIGenerateCSVRule,
|
||||||
Description: "hiddenapi flags",
|
Description: "hiddenapi flags",
|
||||||
@@ -152,6 +151,7 @@ func (h *hiddenAPI) hiddenAPIGenerateCSV(ctx android.ModuleContext, flagsCSV, me
|
|||||||
})
|
})
|
||||||
h.flagsCSVPath = flagsCSV
|
h.flagsCSVPath = flagsCSV
|
||||||
|
|
||||||
|
metadataCSV := android.PathForModuleOut(ctx, "hiddenapi", "metadata.csv")
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: hiddenAPIGenerateCSVRule,
|
Rule: hiddenAPIGenerateCSVRule,
|
||||||
Description: "hiddenapi metadata",
|
Description: "hiddenapi metadata",
|
||||||
@@ -165,6 +165,7 @@ func (h *hiddenAPI) hiddenAPIGenerateCSV(ctx android.ModuleContext, flagsCSV, me
|
|||||||
})
|
})
|
||||||
h.metadataCSVPath = metadataCSV
|
h.metadataCSVPath = metadataCSV
|
||||||
|
|
||||||
|
indexCSV := android.PathForModuleOut(ctx, "hiddenapi", "index.csv")
|
||||||
rule := android.NewRuleBuilder(pctx, ctx)
|
rule := android.NewRuleBuilder(pctx, ctx)
|
||||||
rule.Command().
|
rule.Command().
|
||||||
BuiltTool("merge_csv").
|
BuiltTool("merge_csv").
|
||||||
|
Reference in New Issue
Block a user