Merge "Pass declarations as separate arguments" into main am: 55d25a435f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2665976 Change-Id: Ib6a7eb226f08865b3950d42f6598eb91c2110b27 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -125,12 +125,12 @@ func (module *DeclarationsModule) GenerateAndroidBuildActions(ctx android.Module
|
||||
intermediatePath := android.PathForModuleOut(ctx, "intermediate.pb")
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
Rule: aconfigRule,
|
||||
Inputs: inputFiles,
|
||||
Output: intermediatePath,
|
||||
Description: "aconfig_declarations",
|
||||
Args: map[string]string{
|
||||
"release_version": ctx.Config().ReleaseVersion(),
|
||||
"package": module.properties.Package,
|
||||
"declarations": android.JoinPathsWithPrefix(inputFiles, "--declarations "),
|
||||
"values": joinAndPrefix(" --values ", module.properties.Values),
|
||||
},
|
||||
})
|
||||
|
@@ -26,7 +26,10 @@ func TestAconfigDeclarations(t *testing.T) {
|
||||
aconfig_declarations {
|
||||
name: "module_name",
|
||||
package: "com.example.package",
|
||||
srcs: ["foo.aconfig"],
|
||||
srcs: [
|
||||
"foo.aconfig",
|
||||
"bar.aconfig",
|
||||
],
|
||||
}
|
||||
`
|
||||
result := runTest(t, android.FixtureExpectsNoErrors, bp)
|
||||
|
@@ -27,7 +27,7 @@ var (
|
||||
blueprint.RuleParams{
|
||||
Command: `${aconfig} create-cache` +
|
||||
` --package ${package}` +
|
||||
` --declarations ${in}` +
|
||||
` ${declarations}` +
|
||||
` ${values}` +
|
||||
` --cache ${out}.tmp` +
|
||||
` && ( if cmp -s ${out}.tmp ; then rm ${out}.tmp ; else mv ${out}.tmp ${out} ; fi )`,
|
||||
@@ -36,7 +36,7 @@ var (
|
||||
"${aconfig}",
|
||||
},
|
||||
Restat: true,
|
||||
}, "release_version", "package", "values")
|
||||
}, "release_version", "package", "declarations", "values")
|
||||
|
||||
// For java_aconfig_library: Generate java file
|
||||
srcJarRule = pctx.AndroidStaticRule("aconfig_srcjar",
|
||||
|
Reference in New Issue
Block a user