Update build rule for updated script.
The script now expects flags for filenames and no longer just writes to stdout. Write full merged config too. Test: m libcore-platform-compat-config Change-Id: Ia524a8c271725665772c9543baecd4f494ee86f1
This commit is contained in:
@@ -32,20 +32,23 @@ type platformCompatConfig struct {
|
||||
properties platformCompatConfigProperties
|
||||
installDirPath android.InstallPath
|
||||
configFile android.OutputPath
|
||||
metadataFile android.OutputPath
|
||||
}
|
||||
|
||||
func (p *platformCompatConfig) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
rule := android.NewRuleBuilder()
|
||||
|
||||
configFileName := p.Name() + ".xml"
|
||||
metadataFileName := p.Name() + "_meta.xml"
|
||||
p.configFile = android.PathForModuleOut(ctx, configFileName).OutputPath
|
||||
p.metadataFile = android.PathForModuleOut(ctx, metadataFileName).OutputPath
|
||||
path := android.PathForModuleSrc(ctx, String(p.properties.Src))
|
||||
|
||||
rule.Command().
|
||||
BuiltTool(ctx, "process-compat-config").
|
||||
Input(path).
|
||||
Text(`>`).
|
||||
Output(p.configFile)
|
||||
FlagWithInput("--jar ", path).
|
||||
FlagWithOutput("--device-config ", p.configFile).
|
||||
FlagWithOutput("--merged-config ", p.metadataFile)
|
||||
|
||||
p.installDirPath = android.PathForModuleInstall(ctx, "etc", "compatconfig")
|
||||
rule.Build(pctx, ctx, configFileName, "Extract compat/compat_config.xml and install it")
|
||||
|
Reference in New Issue
Block a user