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

Commit b36d31d8 authored by Cole Faust's avatar Cole Faust
Browse files

Add ctx argument to IDEInfo()

The IDEInfo() methods read properties. To make those properties
configurable, we need a context to evaluate them with.

Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: I26d4b7084439b3006e50b02277298f74a929e1aa
parent 5b35cb9a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1959,7 +1959,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)

			if x, ok := m.module.(IDEInfo); ok {
				var result IdeInfo
				x.IDEInfo(&result)
				x.IDEInfo(ctx, &result)
				result.BaseModuleName = x.BaseModuleName()
				SetProvider(ctx, IdeInfoProviderKey, result)
			}
@@ -2748,7 +2748,7 @@ func (c *buildTargetSingleton) GenerateBuildActions(ctx SingletonContext) {

// Collect information for opening IDE project files in java/jdeps.go.
type IDEInfo interface {
	IDEInfo(ideInfo *IdeInfo)
	IDEInfo(ctx BaseModuleContext, ideInfo *IdeInfo)
	BaseModuleName() string
}

+1 −1
Original line number Diff line number Diff line
@@ -2865,7 +2865,7 @@ func isStaticExecutableAllowed(apex string, exec string) bool {
}

// Collect information for opening IDE project files in java/jdeps.go.
func (a *apexBundle) IDEInfo(dpInfo *android.IdeInfo) {
func (a *apexBundle) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
	dpInfo.Deps = append(dpInfo.Deps, a.properties.Java_libs...)
	dpInfo.Deps = append(dpInfo.Deps, a.properties.Bootclasspath_fragments...)
	dpInfo.Deps = append(dpInfo.Deps, a.properties.ResolvedSystemserverclasspathFragments...)
+1 −1
Original line number Diff line number Diff line
@@ -625,7 +625,7 @@ func (g *Module) setOutputFiles(ctx android.ModuleContext) {
}

// Collect information for opening IDE project files in java/jdeps.go.
func (g *Module) IDEInfo(dpInfo *android.IdeInfo) {
func (g *Module) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
	dpInfo.Srcs = append(dpInfo.Srcs, g.Srcs().Strings()...)
	for _, src := range g.properties.ResolvedSrcs {
		if strings.HasPrefix(src, ":") {
+5 −5
Original line number Diff line number Diff line
@@ -914,12 +914,12 @@ func (a *AndroidLibrary) setOutputFiles(ctx android.ModuleContext) {
	setOutputFiles(ctx, a.Library.Module)
}

func (a *AndroidLibrary) IDEInfo(dpInfo *android.IdeInfo) {
	a.Library.IDEInfo(dpInfo)
	a.aapt.IDEInfo(dpInfo)
func (a *AndroidLibrary) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
	a.Library.IDEInfo(ctx, dpInfo)
	a.aapt.IDEInfo(ctx, dpInfo)
}

func (a *aapt) IDEInfo(dpInfo *android.IdeInfo) {
func (a *aapt) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
	if a.rJar != nil {
		dpInfo.Jars = append(dpInfo.Jars, a.rJar.String())
	}
@@ -1451,6 +1451,6 @@ func AARImportFactory() android.Module {
	return module
}

func (a *AARImport) IDEInfo(dpInfo *android.IdeInfo) {
func (a *AARImport) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
	dpInfo.Jars = append(dpInfo.Jars, a.headerJarFile.String(), a.rJar.String())
}
+3 −3
Original line number Diff line number Diff line
@@ -1243,9 +1243,9 @@ func (a *AndroidApp) EnableCoverageIfNeeded() {}

var _ cc.Coverage = (*AndroidApp)(nil)

func (a *AndroidApp) IDEInfo(dpInfo *android.IdeInfo) {
	a.Library.IDEInfo(dpInfo)
	a.aapt.IDEInfo(dpInfo)
func (a *AndroidApp) IDEInfo(ctx android.BaseModuleContext, dpInfo *android.IdeInfo) {
	a.Library.IDEInfo(ctx, dpInfo)
	a.aapt.IDEInfo(ctx, dpInfo)
}

func (a *AndroidApp) productCharacteristicsRROPackageName() string {
Loading