Generate combined deps-info for all updatable modules.
Introduce a singleton apex rule to merge contents of individual deps-info results into a single output file. Bug: 149622332 Test: m Change-Id: I4ab7e1a3527fead97a81a5a2cb0e1e93a429117c
This commit is contained in:
12
apex/apex.go
12
apex/apex.go
@@ -746,7 +746,7 @@ func apexDepsMutator(mctx android.TopDownMutatorContext) {
|
||||
apexBundles = []android.ApexInfo{{
|
||||
ApexName: mctx.ModuleName(),
|
||||
MinSdkVersion: a.minSdkVersion(mctx),
|
||||
Updatable: proptools.Bool(a.properties.Updatable),
|
||||
Updatable: a.Updatable(),
|
||||
}}
|
||||
directDep = true
|
||||
} else if am, ok := mctx.Module().(android.ApexModule); ok {
|
||||
@@ -1797,6 +1797,12 @@ func (a *apexBundle) minSdkVersion(ctx android.BaseModuleContext) int {
|
||||
return intVer
|
||||
}
|
||||
|
||||
func (a *apexBundle) Updatable() bool {
|
||||
return proptools.Bool(a.properties.Updatable)
|
||||
}
|
||||
|
||||
var _ android.ApexBundleDepsInfoIntf = (*apexBundle)(nil)
|
||||
|
||||
// Ensures that the dependencies are marked as available for this APEX
|
||||
func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) {
|
||||
// Let's be practical. Availability for test, host, and the VNDK apex isn't important
|
||||
@@ -1838,7 +1844,7 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) {
|
||||
}
|
||||
|
||||
func (a *apexBundle) checkUpdatable(ctx android.ModuleContext) {
|
||||
if proptools.Bool(a.properties.Updatable) {
|
||||
if a.Updatable() {
|
||||
if String(a.properties.Min_sdk_version) == "" {
|
||||
ctx.PropertyErrorf("updatable", "updatable APEXes should set min_sdk_version as well")
|
||||
}
|
||||
@@ -2178,7 +2184,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
// We don't need the optimization for updatable APEXes, as it might give false signal
|
||||
// to the system health when the APEXes are still bundled (b/149805758)
|
||||
if proptools.Bool(a.properties.Updatable) && a.properties.ApexType == imageApex {
|
||||
if a.Updatable() && a.properties.ApexType == imageApex {
|
||||
a.linkToSystemLib = false
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user