diff options
| author | 2021-03-01 17:04:53 +0000 | |
|---|---|---|
| committer | 2021-03-01 17:04:53 +0000 | |
| commit | c572b5bf62ba925e017fed347a40903fb0268f09 (patch) | |
| tree | 10daa938277b800c84371585ea79ffb972603af1 /java/hiddenapi_singleton_test.go | |
| parent | 69804ac3886c7ef1d787efea029f2d62cef203b0 (diff) | |
| parent | ec0fe1775b726f852839729ecc16adff1dcffe4d (diff) | |
Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar"
Diffstat (limited to 'java/hiddenapi_singleton_test.go')
| -rw-r--r-- | java/hiddenapi_singleton_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/java/hiddenapi_singleton_test.go b/java/hiddenapi_singleton_test.go index c0f0e381c..fb63820a8 100644 --- a/java/hiddenapi_singleton_test.go +++ b/java/hiddenapi_singleton_test.go @@ -126,6 +126,29 @@ func TestHiddenAPIIndexSingleton(t *testing.T) { `, indexParams) } +func TestHiddenAPISingletonWithSourceAndPrebuiltPreferredButNoDex(t *testing.T) { + config := testConfigWithBootJars(` + java_library { + name: "foo", + srcs: ["a.java"], + compile_dex: true, + } + + java_import { + name: "foo", + jars: ["a.jar"], + prefer: true, + } + `, []string{"platform:foo"}, nil) + + ctx := testContextWithHiddenAPI(config) + + runWithErrors(t, ctx, config, + "hiddenapi has determined that the source module \"foo\" should be ignored as it has been"+ + " replaced by the prebuilt module \"prebuilt_foo\" but unfortunately it does not provide a"+ + " suitable boot dex jar") +} + func TestHiddenAPISingletonWithPrebuilt(t *testing.T) { ctx, _ := testHiddenAPIBootJars(t, ` java_import { |