Merge "Apex: support codenames for min_sdk_version"
This commit is contained in:
12
apex/apex.go
12
apex/apex.go
@@ -20,7 +20,6 @@ import (
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -1806,14 +1805,11 @@ func (a *apexBundle) walkPayloadDeps(ctx android.ModuleContext, do payloadDepsCa
|
||||
|
||||
func (a *apexBundle) minSdkVersion(ctx android.BaseModuleContext) int {
|
||||
ver := proptools.StringDefault(a.properties.Min_sdk_version, "current")
|
||||
if ver != "current" {
|
||||
minSdkVersion, err := strconv.Atoi(ver)
|
||||
if err != nil {
|
||||
ctx.PropertyErrorf("min_sdk_version", "should be \"current\" or <number>, but %q", ver)
|
||||
}
|
||||
return minSdkVersion
|
||||
intVer, err := android.ApiStrToNum(ctx, ver)
|
||||
if err != nil {
|
||||
ctx.PropertyErrorf("min_sdk_version", "%s", err.Error())
|
||||
}
|
||||
return android.FutureApiLevel
|
||||
return intVer
|
||||
}
|
||||
|
||||
// A regexp for removing boilerplate from BaseDependencyTag from the string representation of
|
||||
|
Reference in New Issue
Block a user