Introduce max_sdk_version device property.

Artifacts that go into apexes should only be active on certain SDK
versions. There is now a need to upper bound the range to support
expressiong statements like "this jar should only run on platforms
30-31".

Bug: 190818041
Test: presubmit
Change-Id: I6985ebb671841cdd9f0f37f916267ac5ed76e4f4
Merged-In: I6985ebb671841cdd9f0f37f916267ac5ed76e4f4
(cherry picked from commit 0a420e771a)
This commit is contained in:
satayev
2021-11-29 17:25:52 +00:00
parent fba70bc07f
commit e9b63a8ae0
2 changed files with 13 additions and 0 deletions

View File

@@ -487,6 +487,7 @@ func shouldUncompressDex(ctx android.ModuleContext, dexpreopter *dexpreopter) bo
func (j *Library) GenerateAndroidBuildActions(ctx android.ModuleContext) {
j.sdkVersion = j.SdkVersion(ctx)
j.minSdkVersion = j.MinSdkVersion(ctx)
j.maxSdkVersion = j.MaxSdkVersion(ctx)
apexInfo := ctx.Provider(android.ApexInfoProvider).(android.ApexInfo)
if !apexInfo.IsForPlatform() {