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

Commit 5f692ec2 authored by Colin Cross's avatar Colin Cross
Browse files

Remove empty DepsMutator methods

Add an empty DepsMutator to ModuleBase so it doesn't have to be
implemented on every module that doesn't need it.

Test: all soong tests
Change-Id: I545a832a0dbf27386d3080377a75ea482cd9ce59
parent a74ca046
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -481,6 +481,8 @@ type ModuleBase struct {
	prefer32 func(ctx BaseModuleContext, base *ModuleBase, class OsClass) bool
}

func (a *ModuleBase) DepsMutator(BottomUpMutatorContext) {}

func (a *ModuleBase) AddProperties(props ...interface{}) {
	a.registerProps = append(a.registerProps, props...)
}
+0 −3
Original line number Diff line number Diff line
@@ -366,9 +366,6 @@ type NamespaceModule struct {
	}
}

func (n *NamespaceModule) DepsMutator(context BottomUpMutatorContext) {
}

func (n *NamespaceModule) GenerateAndroidBuildActions(ctx ModuleContext) {
}

+0 −6
Original line number Diff line number Diff line
@@ -222,9 +222,6 @@ func newMockCcLibraryModule() Module {
	return m
}

func (p *mockCcLibraryModule) DepsMutator(ctx BottomUpMutatorContext) {
}

func (p *mockCcLibraryModule) GenerateAndroidBuildActions(ModuleContext) {
}

@@ -244,8 +241,5 @@ func newMockJavaLibraryModule() Module {
	return m
}

func (p *mockJavaLibraryModule) DepsMutator(ctx BottomUpMutatorContext) {
}

func (p *mockJavaLibraryModule) GenerateAndroidBuildActions(ModuleContext) {
}
+0 −3
Original line number Diff line number Diff line
@@ -212,9 +212,6 @@ func (p *prebuiltModule) Name() string {
	return p.prebuilt.Name(p.ModuleBase.Name())
}

func (p *prebuiltModule) DepsMutator(ctx BottomUpMutatorContext) {
}

func (p *prebuiltModule) GenerateAndroidBuildActions(ModuleContext) {
}

+1 −3
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import (
	"io"

	"android/soong/android"

	"github.com/google/blueprint/proptools"
)

@@ -61,9 +62,6 @@ func (m *apexKey) installable() bool {
	return m.properties.Installable == nil || proptools.Bool(m.properties.Installable)
}

func (m *apexKey) DepsMutator(ctx android.BottomUpMutatorContext) {
}

func (m *apexKey) GenerateAndroidBuildActions(ctx android.ModuleContext) {
	if ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() {
		// Flattened APEXes are not signed
Loading