Merge "Extract createEntriesForApexFile" into sc-dev

This commit is contained in:
Paul Duffin 2021-06-20 18:05:55 +00:00 committed by Android (Google) Code Review
commit 1970d6c5ce
1 changed files with 45 additions and 40 deletions

View File

@ -216,6 +216,15 @@ func (p *prebuiltCommon) AndroidMkEntries() []android.AndroidMkEntries {
// apex specific variants of the exported java modules available for use from within make.
apexName := p.BaseModuleName()
for _, fi := range p.apexFilesForAndroidMk {
entries := p.createEntriesForApexFile(fi, apexName)
entriesList = append(entriesList, entries)
}
return entriesList
}
// createEntriesForApexFile creates an AndroidMkEntries for the supplied apexFile
func (p *prebuiltCommon) createEntriesForApexFile(fi apexFile, apexName string) android.AndroidMkEntries {
moduleName := fi.androidMkModuleName + "." + apexName
entries := android.AndroidMkEntries{
Class: fi.class.nameInMake(),
@ -255,11 +264,7 @@ func (p *prebuiltCommon) AndroidMkEntries() []android.AndroidMkEntries {
},
},
}
entriesList = append(entriesList, entries)
}
return entriesList
return entries
}
// prebuiltApexModuleCreator defines the methods that need to be implemented by prebuilt_apex and