Support min_sdk_version overrides in apexes
The use case for this are go apexes which are only installed in T and above, even though the base AOSP apexes might be installable on < T devices. If provided, the overridden min_sdk_version will be 1. Used as the `min_sdk_version` in the manifest file of the top-level override apex binary 2. Used to build the transitive closure of its dependency with that min_sdk_version, i.e. with a different apex variant. (2) requires some special handling. At ToT, the outgoing transition value is the base apex name (e.g. com.android.foo). Since min_sdk_version of the overridding apex can be different than the overridden apex, the base apex name is no longer sufficient. Instead, transition to the name of the overriding apex com.mycompany.android.foo. If deduping is possible, transitive deps will get deduped to `apex_<min_sdk_version>` later. Test: added a unit test Test: in internal, modified min_sdk_version of com.google.android.go.art locally, built BA and Go apexes, and used `aapt2 dump badging` to verify that BA has minSdkVersion of 31 and Go has minSdkVersion of 33 Bug: 295311875 Change-Id: Ifbe123d1517fccbc0c058042b8a6eeb3609b6787
This commit is contained in:
@@ -37,11 +37,7 @@ var (
|
||||
// Accessible via `ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)`
|
||||
type ApexInfo struct {
|
||||
// Name of the apex variation that this module (i.e. the apex variant of the module) is
|
||||
// mutated into, or "" for a platform (i.e. non-APEX) variant. Note that this name and the
|
||||
// Soong module name of the APEX can be different. That happens when there is
|
||||
// `override_apex` that overrides `apex`. In that case, both Soong modules have the same
|
||||
// apex variation name which usually is `com.android.foo`. This name is also the `name`
|
||||
// in the path `/apex/<name>` where this apex is activated on at runtime.
|
||||
// mutated into, or "" for a platform (i.e. non-APEX) variant.
|
||||
//
|
||||
// Also note that a module can be included in multiple APEXes, in which case, the module is
|
||||
// mutated into one or more variants, each of which is for an APEX. The variants then can
|
||||
|
Reference in New Issue
Block a user