AndroidMkEntries minor refactoring.
This includes a few changes that make AndroidMkEntries more resemble AndroidMkData, especially in terms of how extra entries are added. Most importantly it can now have multiple custom functions. Test: Soong tests Change-Id: Ibf9102624d16d0c1c9894a2794fc7c797bb34c9a
This commit is contained in:
12
apex/apex.go
12
apex/apex.go
@@ -1687,11 +1687,13 @@ func (p *Prebuilt) AndroidMkEntries() android.AndroidMkEntries {
|
||||
Class: "ETC",
|
||||
OutputFile: android.OptionalPathForPath(p.inputApex),
|
||||
Include: "$(BUILD_PREBUILT)",
|
||||
AddCustomEntries: func(name, prefix, moduleDir string, entries *android.AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_PATH", filepath.Join("$(OUT_DIR)", p.installDir.RelPathString()))
|
||||
entries.SetString("LOCAL_MODULE_STEM", p.installFilename)
|
||||
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !p.installable())
|
||||
entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", p.properties.Overrides...)
|
||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||
func(entries *android.AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_PATH", filepath.Join("$(OUT_DIR)", p.installDir.RelPathString()))
|
||||
entries.SetString("LOCAL_MODULE_STEM", p.installFilename)
|
||||
entries.SetBoolIfTrue("LOCAL_UNINSTALLABLE_MODULE", !p.installable())
|
||||
entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", p.properties.Overrides...)
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user