summaryrefslogtreecommitdiff
path: root/apex/prebuilt.go
diff options
context:
space:
mode:
author Pechetty Sravani (xWF) <pechetty@google.com> 2024-09-24 06:21:08 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-09-24 06:21:08 +0000
commit4d42248ecbdbe9dfc399c6be306e6a44943c1bbc (patch)
tree3cbad3a44eead9ca7ffbafce626db978d2a10771 /apex/prebuilt.go
parent309a612c9f602c9021989c607a91917194d18e77 (diff)
Revert "Remove `prebuilt_apex_module_creator` mutator"
This reverts commit 309a612c9f602c9021989c607a91917194d18e77. Reason for revert: DroidMonitor created revert due to b/369260559. Change-Id: I1d5c7b8fa8847f5a8dfd510456e8fd9fb2754511
Diffstat (limited to 'apex/prebuilt.go')
-rw-r--r--apex/prebuilt.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/apex/prebuilt.go b/apex/prebuilt.go
index 9cd5688ba..d3f14f9c0 100644
--- a/apex/prebuilt.go
+++ b/apex/prebuilt.go
@@ -253,6 +253,28 @@ func (p *prebuiltCommon) AndroidMkEntries() []android.AndroidMkEntries {
return entriesList
}
+// DEPRECATED. // TODO (spandandas): Remove this interface.
+
+// prebuiltApexModuleCreator defines the methods that need to be implemented by prebuilt_apex and
+// apex_set in order to create the modules needed to provide access to the prebuilt .apex file.
+type prebuiltApexModuleCreator interface {
+ createPrebuiltApexModules(ctx android.BottomUpMutatorContext)
+}
+
+// prebuiltApexModuleCreatorMutator is the mutator responsible for invoking the
+// prebuiltApexModuleCreator's createPrebuiltApexModules method.
+//
+// It is registered as a pre-arch mutator as it must run after the ComponentDepsMutator because it
+// will need to access dependencies added by that (exported modules) but must run before the
+// DepsMutator so that the deapexer module it creates can add dependencies onto itself from the
+// exported modules.
+func prebuiltApexModuleCreatorMutator(ctx android.BottomUpMutatorContext) {
+ module := ctx.Module()
+ if creator, ok := module.(prebuiltApexModuleCreator); ok {
+ creator.createPrebuiltApexModules(ctx)
+ }
+}
+
func (p *prebuiltCommon) hasExportedDeps() bool {
return len(p.prebuiltCommonProperties.Exported_bootclasspath_fragments) > 0 ||
len(p.prebuiltCommonProperties.Exported_systemserverclasspath_fragments) > 0