SdkSpec = Scope + ApiLevel

SdkSpec.Version was an int type. Now it becomes ApiLevel type which
is a better abstraction of the version (or api level).

Bug: 1655587
Test: m

Change-Id: I4d67b9b9eae45f653b6af4f5b73da9e091b3dfab
This commit is contained in:
Jiyong Park
2021-03-31 18:17:53 +09:00
parent 0774773a65
commit 54105c48f4
8 changed files with 65 additions and 97 deletions

View File

@@ -15,6 +15,7 @@
package java
import (
"strconv"
"strings"
"github.com/google/blueprint"
@@ -179,7 +180,7 @@ func (d *dexer) dexCommonFlags(ctx android.ModuleContext, minSdkVersion android.
ctx.PropertyErrorf("min_sdk_version", "%s", err)
}
flags = append(flags, "--min-api "+effectiveVersion.AsNumberString())
flags = append(flags, "--min-api "+strconv.Itoa(effectiveVersion.FinalOrFutureInt()))
return flags
}