diff options
author | Colin Cross <ccross@android.com> | 2017-08-31 12:30:37 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-08-31 13:48:52 -0700 |
commit | 595a406f883bc421b5f2297c098da29376aede40 (patch) | |
tree | 1ed36aa19de7f8116dd4ac65d3ff977a9151e208 /java/java.go | |
parent | 5c51792926b063945d786cc8a1e407a2ce2159cf (diff) |
Pass --min-sdk-version to dx
Pass the sdk_version property, the platform sdk version, or 10000
to dx as --min-sdk-version.
Test: m -j checkbuild
Change-Id: I5fae03f44153dc2d6244c33f4c055e746980aefe
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go index 89c201635..9888b387d 100644 --- a/java/java.go +++ b/java/java.go @@ -407,6 +407,16 @@ func (j *Module) compile(ctx android.ModuleContext) { "--dump-width=1000") } + var minSdkVersion string + switch j.deviceProperties.Sdk_version { + case "", "current", "test_current", "system_current": + minSdkVersion = strconv.Itoa(ctx.AConfig().DefaultAppTargetSdkInt()) + default: + minSdkVersion = j.deviceProperties.Sdk_version + } + + dxFlags = append(dxFlags, "--min-sdk-version="+minSdkVersion) + flags.dxFlags = strings.Join(dxFlags, " ") // Compile classes.jar into classes.dex |