Pass declarations as separate arguments
Aconfig take declarations as separate arguments if there are multiple declaration files. Bug: 291926035 Test: build flags Change-Id: Ic0d069184f48ceaf8947acc5b951eecff7c308f9
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