Merge "Interpret CRT object's min_sdk_version with ApiLevel" into sc-dev

This commit is contained in:
Jooyung Han 2021-06-09 11:18:11 +00:00 committed by Android (Google) Code Review
commit f8b55cd51e
1 changed files with 5 additions and 1 deletions

View File

@ -1971,9 +1971,13 @@ func GetCrtVariations(ctx android.BottomUpMutatorContext,
if minSdkVersion == "" || minSdkVersion == "apex_inherit" {
minSdkVersion = m.SdkVersion()
}
apiLevel, err := android.ApiLevelFromUser(ctx, minSdkVersion)
if err != nil {
ctx.PropertyErrorf("min_sdk_version", err.Error())
}
return []blueprint.Variation{
{Mutator: "sdk", Variation: "sdk"},
{Mutator: "version", Variation: minSdkVersion},
{Mutator: "version", Variation: apiLevel.String()},
}
}
return []blueprint.Variation{