|
@@ -76,11 +76,12 @@ var (
|
|
Command: `rm -f $out && ${jsonmodify} $in ` +
|
|
Command: `rm -f $out && ${jsonmodify} $in ` +
|
|
`-a provideNativeLibs ${provideNativeLibs} ` +
|
|
`-a provideNativeLibs ${provideNativeLibs} ` +
|
|
`-a requireNativeLibs ${requireNativeLibs} ` +
|
|
`-a requireNativeLibs ${requireNativeLibs} ` +
|
|
|
|
+ `-se version 0 ${default_version} ` +
|
|
`${opt} ` +
|
|
`${opt} ` +
|
|
`-o $out`,
|
|
`-o $out`,
|
|
CommandDeps: []string{"${jsonmodify}"},
|
|
CommandDeps: []string{"${jsonmodify}"},
|
|
Description: "prepare ${out}",
|
|
Description: "prepare ${out}",
|
|
- }, "provideNativeLibs", "requireNativeLibs", "opt")
|
|
|
|
|
|
+ }, "provideNativeLibs", "requireNativeLibs", "default_version", "opt")
|
|
|
|
|
|
stripCommentsApexManifestRule = pctx.StaticRule("stripCommentsApexManifestRule", blueprint.RuleParams{
|
|
stripCommentsApexManifestRule = pctx.StaticRule("stripCommentsApexManifestRule", blueprint.RuleParams{
|
|
Command: `sed '/^\s*\/\//d' $in > $out`,
|
|
Command: `sed '/^\s*\/\//d' $in > $out`,
|
|
@@ -93,11 +94,6 @@ var (
|
|
Description: "strip ${in}=>${out}",
|
|
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{
|
|
pbApexManifestRule = pctx.StaticRule("pbApexManifestRule", blueprint.RuleParams{
|
|
Command: `rm -f $out && ${conv_apex_manifest} proto $in -o $out`,
|
|
Command: `rm -f $out && ${conv_apex_manifest} proto $in -o $out`,
|
|
CommandDeps: []string{"${conv_apex_manifest}"},
|
|
CommandDeps: []string{"${conv_apex_manifest}"},
|
|
@@ -224,24 +220,15 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs,
|
|
Output: manifestJsonCommentsStripped,
|
|
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")
|
|
manifestJsonFullOut := android.PathForModuleOut(ctx, "apex_manifest_full.json")
|
|
ctx.Build(pctx, android.BuildParams{
|
|
ctx.Build(pctx, android.BuildParams{
|
|
Rule: apexManifestRule,
|
|
Rule: apexManifestRule,
|
|
- Input: manifestJsonVersionChanged,
|
|
|
|
|
|
+ Input: manifestJsonCommentsStripped,
|
|
Output: manifestJsonFullOut,
|
|
Output: manifestJsonFullOut,
|
|
Args: map[string]string{
|
|
Args: map[string]string{
|
|
"provideNativeLibs": strings.Join(provideNativeLibs, " "),
|
|
"provideNativeLibs": strings.Join(provideNativeLibs, " "),
|
|
"requireNativeLibs": strings.Join(requireNativeLibs, " "),
|
|
"requireNativeLibs": strings.Join(requireNativeLibs, " "),
|
|
|
|
+ "default_version": defaultManifestVersion,
|
|
"opt": strings.Join(optCommands, " "),
|
|
"opt": strings.Join(optCommands, " "),
|
|
},
|
|
},
|
|
})
|
|
})
|