Merge "Replace version 0 with the default version" am: 2971a94e4c am: 656399f062 am: 2668973418

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2149073

Change-Id: I69e7a76408e1d9c67b4df3f14f75877346384fbe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alexei Nicoara
2022-07-11 10:26:17 +00:00
committed by Automerger Merge Worker

View File

@@ -93,6 +93,11 @@ var (
Description: "strip ${in}=>${out}",
})
setVersionApexManifestRule = pctx.StaticRule("setVersionApexManifestRule", blueprint.RuleParams{
Command: `sed 's/\"version\":\s*0\([^0-9]*\)$$/\"version\":\ ${default_version}\1/' $in > $out`,
Description: "Replace 'version: 0' with the correct version // ${in}=>${out}",
}, "default_version")
pbApexManifestRule = pctx.StaticRule("pbApexManifestRule", blueprint.RuleParams{
Command: `rm -f $out && ${conv_apex_manifest} proto $in -o $out`,
CommandDeps: []string{"${conv_apex_manifest}"},
@@ -219,10 +224,20 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs,
Output: manifestJsonCommentsStripped,
})
manifestJsonVersionChanged := android.PathForModuleOut(ctx, "apex_manifest_version_changed.json")
ctx.Build(pctx, android.BuildParams{
Rule: setVersionApexManifestRule,
Input: manifestJsonCommentsStripped,
Output: manifestJsonVersionChanged,
Args: map[string]string{
"default_version": defaultManifestVersion,
},
})
manifestJsonFullOut := android.PathForModuleOut(ctx, "apex_manifest_full.json")
ctx.Build(pctx, android.BuildParams{
Rule: apexManifestRule,
Input: manifestJsonCommentsStripped,
Input: manifestJsonVersionChanged,
Output: manifestJsonFullOut,
Args: map[string]string{
"provideNativeLibs": strings.Join(provideNativeLibs, " "),