Merge "Add deapexer support for apex_set" am: d137306c16
am: ada746ce26
am: 6a98d68960
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1665744 Change-Id: I17e1e7feb52eb2b162b94f4e31fa3fc777dd5bf0
This commit is contained in:
@@ -664,7 +664,7 @@ func (a *ApexSet) Overrides() []string {
|
||||
// prebuilt_apex imports an `.apex` file into the build graph as if it was built with apex.
|
||||
func apexSetFactory() android.Module {
|
||||
module := &ApexSet{}
|
||||
module.AddProperties(&module.properties, &module.selectedApexProperties)
|
||||
module.AddProperties(&module.properties, &module.selectedApexProperties, &module.deapexerProperties)
|
||||
|
||||
android.InitSingleSourcePrebuiltModule(module, &module.selectedApexProperties, "Selected_apex")
|
||||
android.InitAndroidMultiTargetsArchModule(module, android.DeviceSupported, android.MultilibCommon)
|
||||
@@ -676,6 +676,9 @@ func apexSetFactory() android.Module {
|
||||
createApexExtractorModule(ctx, apexExtractorModuleName, &module.properties.ApexExtractorProperties)
|
||||
|
||||
apexFileSource := ":" + apexExtractorModuleName
|
||||
if len(module.deapexerProperties.Exported_java_libs) != 0 {
|
||||
createDeapexerModule(ctx, deapexerModuleName(baseModuleName), apexFileSource, &module.deapexerProperties)
|
||||
}
|
||||
|
||||
// After passing the arch specific src properties to the creating the apex selector module
|
||||
module.selectedApexProperties.Selected_apex = proptools.StringPtr(apexFileSource)
|
||||
@@ -701,6 +704,16 @@ func apexExtractorModuleName(baseModuleName string) string {
|
||||
return baseModuleName + ".apex.extractor"
|
||||
}
|
||||
|
||||
func (a *ApexSet) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||
a.deapexerDeps(ctx)
|
||||
}
|
||||
|
||||
var _ ApexInfoMutator = (*ApexSet)(nil)
|
||||
|
||||
func (a *ApexSet) ApexInfoMutator(mctx android.TopDownMutatorContext) {
|
||||
a.apexInfoMutator(mctx)
|
||||
}
|
||||
|
||||
func (a *ApexSet) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
a.installFilename = a.InstallFilename()
|
||||
if !strings.HasSuffix(a.installFilename, imageApexSuffix) {
|
||||
|
Reference in New Issue
Block a user