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
diff --git a/android/config.go b/android/config.go
index c435e85..32a4783 100644
--- a/android/config.go
+++ b/android/config.go
@@ -382,6 +382,14 @@
return 14
}
+func (c *config) DefaultAppTargetSdkInt() int {
+ if Bool(c.ProductVariables.Platform_sdk_final) {
+ return c.PlatformSdkVersionInt()
+ } else {
+ return 10000
+ }
+}
+
// Codenames that are active in the current lunch target.
func (c *config) PlatformVersionActiveCodenames() []string {
return c.ProductVariables.Platform_version_active_codenames
diff --git a/android/variable.go b/android/variable.go
index 1ecd9fb..9dd9d25 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -108,6 +108,7 @@
Make_suffix *string `json:",omitempty"`
Platform_sdk_version *int `json:",omitempty"`
+ Platform_sdk_final *bool `json:",omitempty"`
Platform_version_active_codenames []string `json:",omitempty"`
Platform_version_future_codenames []string `json:",omitempty"`