summaryrefslogtreecommitdiff
path: root/android/transition.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2025-01-31 11:43:13 -0800
committer Colin Cross <ccross@android.com> 2025-01-31 19:25:21 -0800
commit4e041524581d608c7fc243b121b4ce5f58782068 (patch)
treefe58d175e77223c9cf359aaaa487b0696ebfa0ba /android/transition.go
parentd5c643112afa3e935e112a7e87705b5398d3532b (diff)
Add ModuleName to transition contexts
ModuleName will be needed by the apex transition mutator in order to generate an appropriate ApexInfo configuration. Also add DepTag to IncomingTrnasitionContext. Bug: 372543712 Test: builds Change-Id: I2f7a5c2d603d225e188566a8a0a7c1230b79a1ef
Diffstat (limited to 'android/transition.go')
-rw-r--r--android/transition.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/android/transition.go b/android/transition.go
index 7c04effc3..a9346bbd1 100644
--- a/android/transition.go
+++ b/android/transition.go
@@ -108,6 +108,14 @@ type IncomingTransitionContext interface {
// is being computed
Module() Module
+ // ModuleName returns the name of the module. This is generally the value that was returned by Module.Name() when
+ // the module was created, but may have been modified by calls to BottomUpMutatorContext.Rename.
+ ModuleName() string
+
+ // DepTag() Returns the dependency tag through which this dependency is
+ // reached
+ DepTag() blueprint.DependencyTag
+
// Config returns the configuration for the build.
Config() Config
@@ -128,6 +136,10 @@ type OutgoingTransitionContext interface {
// is being computed
Module() Module
+ // ModuleName returns the name of the module. This is generally the value that was returned by Module.Name() when
+ // the module was created, but may have been modified by calls to BottomUpMutatorContext.Rename.
+ ModuleName() string
+
// DepTag() Returns the dependency tag through which this dependency is
// reached
DepTag() blueprint.DependencyTag
@@ -209,6 +221,14 @@ func (c *incomingTransitionContextImpl) Module() Module {
return c.bp.Module().(Module)
}
+func (c *incomingTransitionContextImpl) ModuleName() string {
+ return c.bp.ModuleName()
+}
+
+func (c *incomingTransitionContextImpl) DepTag() blueprint.DependencyTag {
+ return c.bp.DepTag()
+}
+
func (c *incomingTransitionContextImpl) Config() Config {
return c.bp.Config().(Config)
}
@@ -242,6 +262,10 @@ func (c *outgoingTransitionContextImpl) Module() Module {
return c.bp.Module().(Module)
}
+func (c *outgoingTransitionContextImpl) ModuleName() string {
+ return c.bp.ModuleName()
+}
+
func (c *outgoingTransitionContextImpl) DepTag() blueprint.DependencyTag {
return c.bp.DepTag()
}