fix: "no_apex" can be put in defaults

Currently, putting no_apex in defaults module doesn't work.

To fix this,
* 'no_apex' property is added as 'defaultable'.
* apex module doesn't follow beyond 'defaults' module.

Bug: 141560644
Test: m (soong tests added)
Change-Id: I8410785f7f83d843689a33b1241d74086c6a7671
This commit is contained in:
Jooyung Han
2019-09-25 15:18:44 +09:00
parent ec3e81b4be
commit cc372c5b1d
3 changed files with 90 additions and 5 deletions

View File

@@ -1170,6 +1170,8 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
}
} else if am.CanHaveApexVariants() && am.IsInstallableToApex() {
ctx.ModuleErrorf("unexpected tag %q for indirect dependency %q", depTag, depName)
} else if depTag == android.DefaultsDepTag {
return false
} else if am.NoApex() && !android.InList(depName, whitelistNoApex[ctx.ModuleName()]) {
ctx.ModuleErrorf("tries to include no_apex module %s", depName)
}