Merge "apex_available is defaultable" am: cea93afe76

am: f8bde14a30

Change-Id: I32be935ffb9726c372d84edc1521cbe7b4cf0680
This commit is contained in:
Jiyong Park
2019-12-05 20:33:07 -08:00
committed by android-build-merger
3 changed files with 4 additions and 4 deletions

View File

@@ -151,7 +151,8 @@ func InitDefaultsModule(module DefaultsModule) {
module.AddProperties(
&hostAndDeviceProperties{},
commonProperties,
&variableProperties{})
&variableProperties{},
&ApexProperties{})
InitArchModule(module)
InitDefaultableModule(module)

View File

@@ -1157,12 +1157,12 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
})
// check apex_available requirements
if !ctx.Host() {
if !ctx.Host() && !a.testApex {
for _, fi := range filesInfo {
if am, ok := fi.module.(android.ApexModule); ok {
if !am.AvailableFor(ctx.ModuleName()) {
ctx.ModuleErrorf("requires %q that is not available for the APEX", fi.module.Name())
return
// don't stop so that we can report other violations in the same run
}
}
}

View File

@@ -2459,7 +2459,6 @@ func DefaultsFactory(props ...interface{}) android.Module {
&PgoProperties{},
&XomProperties{},
&android.ProtoProperties{},
&android.ApexProperties{},
)
android.InitDefaultsModule(module)