Merge "Removing comment lines from apex_manifest.json"
This commit is contained in:
@@ -82,6 +82,11 @@ var (
|
|||||||
Description: "prepare ${out}",
|
Description: "prepare ${out}",
|
||||||
}, "provideNativeLibs", "requireNativeLibs", "opt")
|
}, "provideNativeLibs", "requireNativeLibs", "opt")
|
||||||
|
|
||||||
|
stripCommentsApexManifestRule = pctx.StaticRule("stripCommentsApexManifestRule", blueprint.RuleParams{
|
||||||
|
Command: `sed '/^\s*\/\//d' $in > $out`,
|
||||||
|
Description: "strip lines starting with // ${in}=>${out}",
|
||||||
|
})
|
||||||
|
|
||||||
stripApexManifestRule = pctx.StaticRule("stripApexManifestRule", blueprint.RuleParams{
|
stripApexManifestRule = pctx.StaticRule("stripApexManifestRule", blueprint.RuleParams{
|
||||||
Command: `rm -f $out && ${conv_apex_manifest} strip $in -o $out`,
|
Command: `rm -f $out && ${conv_apex_manifest} strip $in -o $out`,
|
||||||
CommandDeps: []string{"${conv_apex_manifest}"},
|
CommandDeps: []string{"${conv_apex_manifest}"},
|
||||||
@@ -205,10 +210,17 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs,
|
|||||||
optCommands = append(optCommands, "-a jniLibs "+strings.Join(jniLibs, " "))
|
optCommands = append(optCommands, "-a jniLibs "+strings.Join(jniLibs, " "))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
manifestJsonCommentsStripped := android.PathForModuleOut(ctx, "apex_manifest_comments_stripped.json")
|
||||||
|
ctx.Build(pctx, android.BuildParams{
|
||||||
|
Rule: stripCommentsApexManifestRule,
|
||||||
|
Input: src,
|
||||||
|
Output: manifestJsonCommentsStripped,
|
||||||
|
})
|
||||||
|
|
||||||
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: src,
|
Input: manifestJsonCommentsStripped,
|
||||||
Output: manifestJsonFullOut,
|
Output: manifestJsonFullOut,
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"provideNativeLibs": strings.Join(provideNativeLibs, " "),
|
"provideNativeLibs": strings.Join(provideNativeLibs, " "),
|
||||||
|
Reference in New Issue
Block a user