Merge "Interpret CRT object's min_sdk_version with ApiLevel"

This commit is contained in:
Jooyung Han 2021-06-09 00:07:29 +00:00 committed by Gerrit Code Review
commit 7f6e057f23

View file

@ -1970,9 +1970,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{