diff options
author | Colin Cross <ccross@android.com> | 2018-06-25 15:48:06 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2018-07-09 12:42:01 -0700 |
commit | 83bb3167f6a774139a1b9b230fa4c7621aeb1cbe (patch) | |
tree | c592947b069352f43a70c9f717e70764b4596943 /java/dex.go | |
parent | 17ef5635fa1b81a0aa41f6ad094afc740444db36 (diff) | |
download | build_soong-83bb3167f6a774139a1b9b230fa4c7621aeb1cbe.tar.gz build_soong-83bb3167f6a774139a1b9b230fa4c7621aeb1cbe.tar.bz2 build_soong-83bb3167f6a774139a1b9b230fa4c7621aeb1cbe.zip |
Add support for min_sdk_version
Add min_sdk_version properties and use it for aapt2
--min-sdk-version and --target-sdk-version flags. Add an sdkContext
interface that any function that needs an sdk version can take in
order to get the values for the current module.
Bug: 110848854
Test: m checkbuild
Change-Id: Ic69f1f935d8b865ec77689350407df08bfac5925
Diffstat (limited to 'java/dex.go')
-rw-r--r-- | java/dex.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/java/dex.go b/java/dex.go index f729bade..06ee272d 100644 --- a/java/dex.go +++ b/java/dex.go @@ -70,7 +70,12 @@ func (j *Module) dxFlags(ctx android.ModuleContext) []string { "--verbose") } - flags = append(flags, "--min-api "+j.minSdkVersionNumber(ctx)) + minSdkVersion, err := sdkVersionToNumberAsString(ctx, j.minSdkVersion()) + if err != nil { + ctx.PropertyErrorf("min_sdk_version", "%s", err) + } + + flags = append(flags, "--min-api "+minSdkVersion) return flags } |