Consolidate baseContext, BaseContext, and BaseModuleContext

blueprint.BaseModuleContext is the set of methods available to all
module-specific calls (GenerateBuildActions or mutators).  The
android package split the same functionality across baseContext (nee
androidBaseContext), BaseModuleContext, and BaseContext.
Consolidate all of them into android.BaseModuleContext.

Test: m checkbuild
Change-Id: I2d7f5c56fd4424032cb93edff6dc730ff33e4f1e
This commit is contained in:
Colin Cross
2019-06-06 14:33:29 -07:00
parent 4157e88427
commit 0ea8ba82fc
13 changed files with 115 additions and 119 deletions

View File

@@ -380,8 +380,8 @@ type Dependency interface {
}
type SdkLibraryDependency interface {
SdkHeaderJars(ctx android.BaseContext, sdkVersion string) android.Paths
SdkImplementationJars(ctx android.BaseContext, sdkVersion string) android.Paths
SdkHeaderJars(ctx android.BaseModuleContext, sdkVersion string) android.Paths
SdkImplementationJars(ctx android.BaseModuleContext, sdkVersion string) android.Paths
}
type SrcDependency interface {
@@ -448,11 +448,11 @@ type jniLib struct {
target android.Target
}
func (j *Module) shouldInstrument(ctx android.BaseContext) bool {
func (j *Module) shouldInstrument(ctx android.BaseModuleContext) bool {
return j.properties.Instrument && ctx.Config().IsEnvTrue("EMMA_INSTRUMENT")
}
func (j *Module) shouldInstrumentStatic(ctx android.BaseContext) bool {
func (j *Module) shouldInstrumentStatic(ctx android.BaseModuleContext) bool {
return j.shouldInstrument(ctx) &&
(ctx.Config().IsEnvTrue("EMMA_INSTRUMENT_STATIC") ||
ctx.Config().UnbundledBuild())