summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2020-10-06 17:20:13 +0100
committerPaul Duffin <paulduffin@google.com>2020-10-06 17:48:37 +0100
commitaa55f745051c31e48c0002699e17d0ef88eb2100 (patch)
tree7c16cc2b4937b676f8efb967d024e6827a9b2b09 /java/java_test.go
parent81febc4500087425f1b3725a0f8fd83a68bc73b8 (diff)
Allow access to the class jar for java_import using {.jar} tag
Layoutlib requires access to the jar file (containing .class) files for a number of libraries including "core-libart". It does that using the {.jar} output tag, e.g. "core-libart{.jar}". This change makes sure that works when "core-libart" is provided as a java_import instead of a java_library. Bug: 142938164 Test: m nothing Change-Id: I605019d680c28e4a33f0ca14279d63fa62b9774b
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go26
1 files changed, 25 insertions, 1 deletions
diff --git a/java/java_test.go b/java/java_test.go
index f16639aa8..a43e2a8c9 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -1412,7 +1412,31 @@ func TestJavaLibrary(t *testing.T) {
name: "core",
sdk_version: "none",
system_modules: "none",
- }`),
+ }
+
+ filegroup {
+ name: "core-jar",
+ srcs: [":core{.jar}"],
+ }
+`),
+ })
+ ctx := testContext()
+ run(t, ctx, config)
+}
+
+func TestJavaImport(t *testing.T) {
+ config := testConfig(nil, "", map[string][]byte{
+ "libcore/Android.bp": []byte(`
+ java_import {
+ name: "core",
+ sdk_version: "none",
+ }
+
+ filegroup {
+ name: "core-jar",
+ srcs: [":core{.jar}"],
+ }
+`),
})
ctx := testContext()
run(t, ctx, config)