Merge "Convert RuleBuilder to static rule in buildRuleToGenerateIndex" am: 7ae8afc115
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2436674 Change-Id: Ie0f3096a02cec5712f6d0fa9ecc63302d8e21972 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -195,6 +195,7 @@ func init() {
|
|||||||
pctx.HostBinToolVariable("ManifestMergerCmd", "manifest-merger")
|
pctx.HostBinToolVariable("ManifestMergerCmd", "manifest-merger")
|
||||||
|
|
||||||
pctx.HostBinToolVariable("Class2NonSdkList", "class2nonsdklist")
|
pctx.HostBinToolVariable("Class2NonSdkList", "class2nonsdklist")
|
||||||
|
pctx.HostBinToolVariable("MergeCsvCommand", "merge_csv")
|
||||||
pctx.HostBinToolVariable("HiddenAPI", "hiddenapi")
|
pctx.HostBinToolVariable("HiddenAPI", "hiddenapi")
|
||||||
|
|
||||||
hostBinToolVariableWithSdkToolsPrebuilt("Aapt2Cmd", "aapt2")
|
hostBinToolVariableWithSdkToolsPrebuilt("Aapt2Cmd", "aapt2")
|
||||||
|
@@ -20,10 +20,17 @@ import (
|
|||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
)
|
)
|
||||||
|
|
||||||
var hiddenAPIGenerateCSVRule = pctx.AndroidStaticRule("hiddenAPIGenerateCSV", blueprint.RuleParams{
|
var (
|
||||||
Command: "${config.Class2NonSdkList} --stub-api-flags ${stubAPIFlags} $in $outFlag $out",
|
hiddenAPIGenerateCSVRule = pctx.AndroidStaticRule("hiddenAPIGenerateCSV", blueprint.RuleParams{
|
||||||
CommandDeps: []string{"${config.Class2NonSdkList}"},
|
Command: "${config.Class2NonSdkList} --stub-api-flags ${stubAPIFlags} $in $outFlag $out",
|
||||||
}, "outFlag", "stubAPIFlags")
|
CommandDeps: []string{"${config.Class2NonSdkList}"},
|
||||||
|
}, "outFlag", "stubAPIFlags")
|
||||||
|
|
||||||
|
hiddenAPIGenerateIndexRule = pctx.AndroidStaticRule("hiddenAPIGenerateIndex", blueprint.RuleParams{
|
||||||
|
Command: "${config.MergeCsvCommand} --zip_input --key_field signature --output=$out $in",
|
||||||
|
CommandDeps: []string{"${config.MergeCsvCommand}"},
|
||||||
|
})
|
||||||
|
)
|
||||||
|
|
||||||
type hiddenAPI struct {
|
type hiddenAPI struct {
|
||||||
// True if the module containing this structure contributes to the hiddenapi information or has
|
// True if the module containing this structure contributes to the hiddenapi information or has
|
||||||
@@ -216,14 +223,12 @@ func buildRuleToGenerateMetadata(ctx android.ModuleContext, desc string, classes
|
|||||||
// created by the unsupported app usage annotation processor during compilation of the class
|
// created by the unsupported app usage annotation processor during compilation of the class
|
||||||
// implementation jar.
|
// implementation jar.
|
||||||
func buildRuleToGenerateIndex(ctx android.ModuleContext, desc string, classesJars android.Paths, indexCSV android.WritablePath) {
|
func buildRuleToGenerateIndex(ctx android.ModuleContext, desc string, classesJars android.Paths, indexCSV android.WritablePath) {
|
||||||
rule := android.NewRuleBuilder(pctx, ctx)
|
ctx.Build(pctx, android.BuildParams{
|
||||||
rule.Command().
|
Rule: hiddenAPIGenerateIndexRule,
|
||||||
BuiltTool("merge_csv").
|
Description: desc,
|
||||||
Flag("--zip_input").
|
Inputs: classesJars,
|
||||||
Flag("--key_field signature").
|
Output: indexCSV,
|
||||||
FlagWithOutput("--output=", indexCSV).
|
})
|
||||||
Inputs(classesJars)
|
|
||||||
rule.Build(desc, desc)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var hiddenAPIEncodeDexRule = pctx.AndroidStaticRule("hiddenAPIEncodeDex", blueprint.RuleParams{
|
var hiddenAPIEncodeDexRule = pctx.AndroidStaticRule("hiddenAPIEncodeDex", blueprint.RuleParams{
|
||||||
|
Reference in New Issue
Block a user