diff options
| author | 2024-05-13 18:29:45 +0000 | |
|---|---|---|
| committer | 2024-05-17 21:15:04 +0000 | |
| commit | b9c58350caa1da5414db4bbfe86a6af72ef67278 (patch) | |
| tree | 5ac05e41475e2f53853f006b04e7c047e72da439 /java/java.go | |
| parent | 229b0098bd4e771be6bafdd4d942a3e1764a5433 (diff) | |
Support min_sdk_version overrides in apps
This replaces the global override of min_sdk_version (via
`APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE`) with an min_sdk_version override
that can be set by each individual soong override_app.
The use case for this are go apps which are only installed in T and
above, even though the base AOSP apexes might be installable on < T
devices.
Test: added a unit test
Bug: 295311875
Change-Id: Ie2e738a6786bb24417c675617f7c78358017c96c
Diffstat (limited to 'java/java.go')
| -rw-r--r-- | java/java.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/java.go b/java/java.go index 05ef5d04f..e3f482450 100644 --- a/java/java.go +++ b/java/java.go @@ -909,7 +909,7 @@ func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) { // Check min_sdk_version of the transitive dependencies if this module is created from // java_sdk_library. - if j.deviceProperties.Min_sdk_version != nil && j.SdkLibraryName() != nil { + if j.overridableProperties.Min_sdk_version != nil && j.SdkLibraryName() != nil { j.CheckDepsMinSdkVersion(ctx) } @@ -1097,7 +1097,7 @@ func (p *librarySdkMemberProperties) PopulateFromVariant(ctx android.SdkMemberCo // If the min_sdk_version was set then add the canonical representation of the API level to the // snapshot. - if j.deviceProperties.Min_sdk_version != nil { + if j.overridableProperties.Min_sdk_version != nil { canonical, err := android.ReplaceFinalizedCodenames(ctx.SdkModuleContext().Config(), j.minSdkVersion.String()) if err != nil { ctx.ModuleErrorf("%s", err) |