Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1a842010 authored by Colin Cross's avatar Colin Cross
Browse files

Remove AlwaysRequireApexVariantTag

Nothing implements AlwaysRequireApexVariantTag, remove it.

Bug: 372543712
Test: builds
Change-Id: Ie438d7a79e171f398b36ce1938249eb3145fcc9b
parent 7e129d26
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -264,9 +264,6 @@ type ApexProperties struct {

// Marker interface that identifies dependencies that are excluded from APEX contents.
//
// Unless the tag also implements the AlwaysRequireApexVariantTag this will prevent an apex variant
// from being created for the module.
//
// At the moment the sdk.sdkRequirementsMutator relies on the fact that the existing tags which
// implement this interface do not define dependencies onto members of an sdk_snapshot. If that
// changes then sdk.sdkRequirementsMutator will need fixing.
@@ -277,17 +274,6 @@ type ExcludeFromApexContentsTag interface {
	ExcludeFromApexContents()
}

// Marker interface that identifies dependencies that always requires an APEX variant to be created.
//
// It is possible for a dependency to require an apex variant but exclude the module from the APEX
// contents. See sdk.sdkMemberDependencyTag.
type AlwaysRequireApexVariantTag interface {
	blueprint.DependencyTag

	// Return true if this tag requires that the target dependency has an apex variant.
	AlwaysRequireApexVariant() bool
}

// Interface that identifies dependencies to skip Apex dependency check
type SkipApexAllowedDependenciesCheck interface {
	// Returns true to skip the Apex dependency check, which limits the allowed dependency in build.
+1 −14
Original line number Diff line number Diff line
@@ -973,21 +973,8 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) {
		if !ok || !am.CanHaveApexVariants() {
			return false
		}
		depTag := mctx.OtherModuleDependencyTag(child)

		// Check to see if the tag always requires that the child module has an apex variant for every
		// apex variant of the parent module. If it does not then it is still possible for something
		// else, e.g. the DepIsInSameApex(...) method to decide that a variant is required.
		if required, ok := depTag.(android.AlwaysRequireApexVariantTag); ok && required.AlwaysRequireApexVariant() {
			return true
		}
		if !android.IsDepInSameApex(mctx, parent, child) {
			return false
		}

		// By default, all the transitive dependencies are collected, unless filtered out
		// above.
		return true
		return android.IsDepInSameApex(mctx, parent, child)
	}

	android.SetProvider(mctx, android.ApexBundleInfoProvider, android.ApexBundleInfo{})