diff options
| author | Jaewoong Jung <jungjw@google.com> | 2021-04-01 19:45:53 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-04-01 19:45:53 +0000 |
| commit | 51a0d85ebcf52e4c0fa4c7377957ae6172b87b1c (patch) | |
| tree | 44bfdff7171e3551563b5897e00c359f9001a057 /apex/apex_test.go | |
| parent | c5b3a1722cbf0cd9bca484ac7f5db9a3f40d6c60 (diff) | |
| parent | 6d15d635569d420035e924c12a08091f0e9c579d (diff) | |
Merge "Add min_sdk_version to java_import."
Diffstat (limited to 'apex/apex_test.go')
| -rw-r--r-- | apex/apex_test.go | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go index 0caad13dc..98b40fd5b 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -1836,6 +1836,30 @@ func TestApexMinSdkVersion_ErrorIfIncompatibleVersion(t *testing.T) { min_sdk_version: "30", } `) + + testApexError(t, `module "libfoo".*: should support min_sdk_version\(29\)`, ` + apex { + name: "myapex", + key: "myapex.key", + java_libs: ["libfoo"], + min_sdk_version: "29", + } + + apex_key { + name: "myapex.key", + public_key: "testkey.avbpubkey", + private_key: "testkey.pem", + } + + java_import { + name: "libfoo", + jars: ["libfoo.jar"], + apex_available: [ + "myapex", + ], + min_sdk_version: "30", + } + `) } func TestApexMinSdkVersion_Okay(t *testing.T) { @@ -1873,7 +1897,10 @@ func TestApexMinSdkVersion_Okay(t *testing.T) { name: "libbar", sdk_version: "current", srcs: ["a.java"], - static_libs: ["libbar_dep"], + static_libs: [ + "libbar_dep", + "libbar_import_dep", + ], apex_available: ["myapex"], min_sdk_version: "29", } @@ -1885,6 +1912,13 @@ func TestApexMinSdkVersion_Okay(t *testing.T) { apex_available: ["myapex"], min_sdk_version: "29", } + + java_import { + name: "libbar_import_dep", + jars: ["libbar.jar"], + apex_available: ["myapex"], + min_sdk_version: "29", + } `) } |
