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")
|
intermediatePath := android.PathForModuleOut(ctx, "intermediate.pb")
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: aconfigRule,
|
Rule: aconfigRule,
|
||||||
Inputs: inputFiles,
|
|
||||||
Output: intermediatePath,
|
Output: intermediatePath,
|
||||||
Description: "aconfig_declarations",
|
Description: "aconfig_declarations",
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"release_version": ctx.Config().ReleaseVersion(),
|
"release_version": ctx.Config().ReleaseVersion(),
|
||||||
"package": module.properties.Package,
|
"package": module.properties.Package,
|
||||||
|
"declarations": android.JoinPathsWithPrefix(inputFiles, "--declarations "),
|
||||||
"values": joinAndPrefix(" --values ", module.properties.Values),
|
"values": joinAndPrefix(" --values ", module.properties.Values),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@@ -26,7 +26,10 @@ func TestAconfigDeclarations(t *testing.T) {
|
|||||||
aconfig_declarations {
|
aconfig_declarations {
|
||||||
name: "module_name",
|
name: "module_name",
|
||||||
package: "com.example.package",
|
package: "com.example.package",
|
||||||
srcs: ["foo.aconfig"],
|
srcs: [
|
||||||
|
"foo.aconfig",
|
||||||
|
"bar.aconfig",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
result := runTest(t, android.FixtureExpectsNoErrors, bp)
|
result := runTest(t, android.FixtureExpectsNoErrors, bp)
|
||||||
|
@@ -27,7 +27,7 @@ var (
|
|||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: `${aconfig} create-cache` +
|
Command: `${aconfig} create-cache` +
|
||||||
` --package ${package}` +
|
` --package ${package}` +
|
||||||
` --declarations ${in}` +
|
` ${declarations}` +
|
||||||
` ${values}` +
|
` ${values}` +
|
||||||
` --cache ${out}.tmp` +
|
` --cache ${out}.tmp` +
|
||||||
` && ( if cmp -s ${out}.tmp ; then rm ${out}.tmp ; else mv ${out}.tmp ${out} ; fi )`,
|
` && ( if cmp -s ${out}.tmp ; then rm ${out}.tmp ; else mv ${out}.tmp ${out} ; fi )`,
|
||||||
@@ -36,7 +36,7 @@ var (
|
|||||||
"${aconfig}",
|
"${aconfig}",
|
||||||
},
|
},
|
||||||
Restat: true,
|
Restat: true,
|
||||||
}, "release_version", "package", "values")
|
}, "release_version", "package", "declarations", "values")
|
||||||
|
|
||||||
// For java_aconfig_library: Generate java file
|
// For java_aconfig_library: Generate java file
|
||||||
srcJarRule = pctx.AndroidStaticRule("aconfig_srcjar",
|
srcJarRule = pctx.AndroidStaticRule("aconfig_srcjar",
|
||||||
|
Reference in New Issue
Block a user