summaryrefslogtreecommitdiff
path: root/java/dex_test.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-01-03 22:25:01 +0000
committer Spandan Das <spandandas@google.com> 2023-01-04 00:16:45 +0000
commitdaa220ae8ce36c3c155bb35b205a5826c779202c (patch)
treed5fa17c78a6ac19c1becd619fb9a26bd2537c6b2 /java/dex_test.go
parenta8b0bfbeabcf85933d449a854f7be0f8fae5c145 (diff)
R8/D8 should use sdk_version prop to determine API surface stability.
`min_sdk_version` is used to represent the api_level of the device and its type will eventually become android.ApiLevel. OTOH, `sdk_version` property represents the API surface a module builds against _and_ the version of that API surface. For R8/D8, the additional `--android-platform-build` should be determined using the sdk_version of the soong module and not min_sdk_version, since min_sdk_version will not contain information about the api surface used for compilation. The unit test for `core_platform_app` in TestR8 were passing since min_sdk_version was not set, and therefore it implicitly defaulted to sdk_version. Also created a custom struct to propagate params to the helper dex functions Test: In build/soong, go test ./java Test: TH Bug: 208456999 Change-Id: I08ac6f496444d603557e498c8a1794af665abc7a
Diffstat (limited to 'java/dex_test.go')
-rw-r--r--java/dex_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/java/dex_test.go b/java/dex_test.go
index fc6cd0f3f..cddd4ad83 100644
--- a/java/dex_test.go
+++ b/java/dex_test.go
@@ -41,6 +41,7 @@ func TestR8(t *testing.T) {
name: "core_platform_app",
srcs: ["foo.java"],
sdk_version: "core_platform",
+ min_sdk_version: "31",
}
java_library {