Add deapexer support for apex_set
Bug: 181267622 Test: m droid Change-Id: I630f9f2c33d037bf4a7011d2131a7d28f213ae8b
This commit is contained in:
@@ -668,7 +668,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)
|
||||
@@ -680,6 +680,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)
|
||||
@@ -705,6 +708,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