summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2020-06-04 05:06:22 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-06-04 05:06:22 +0000
commita8bf98852a1e5667d23c8c37bc3c28f2ae4366b4 (patch)
tree06fe297d8a86dc9e4c061428db63596040bc6823 /apex/apex_test.go
parent3747336d233103c9660d06699f6ac1bb86d405ce (diff)
parent77acec63fec7d2f3e08f56954a4fb70f7906b2ed (diff)
Merge "dex_import can be added to apex"
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 779119c27..e45cd0091 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -329,7 +329,10 @@ func TestBasicApex(t *testing.T) {
binaries: ["foo",],
}
},
- java_libs: ["myjar"],
+ java_libs: [
+ "myjar",
+ "myjar_dex",
+ ],
}
apex {
@@ -438,6 +441,15 @@ func TestBasicApex(t *testing.T) {
],
}
+ dex_import {
+ name: "myjar_dex",
+ jars: ["prebuilt.jar"],
+ apex_available: [
+ "//apex_available:platform",
+ "myapex",
+ ],
+ }
+
java_library {
name: "myotherjar",
srcs: ["foo/bar/MyClass.java"],
@@ -473,6 +485,7 @@ func TestBasicApex(t *testing.T) {
// Ensure that apex variant is created for the direct dep
ensureListContains(t, ctx.ModuleVariantsForTests("mylib"), "android_arm64_armv8-a_shared_myapex")
ensureListContains(t, ctx.ModuleVariantsForTests("myjar"), "android_common_myapex")
+ ensureListContains(t, ctx.ModuleVariantsForTests("myjar_dex"), "android_common_myapex")
// Ensure that apex variant is created for the indirect dep
ensureListContains(t, ctx.ModuleVariantsForTests("mylib2"), "android_arm64_armv8-a_shared_myapex")
@@ -482,6 +495,7 @@ func TestBasicApex(t *testing.T) {
ensureContains(t, copyCmds, "image.apex/lib64/mylib.so")
ensureContains(t, copyCmds, "image.apex/lib64/mylib2.so")
ensureContains(t, copyCmds, "image.apex/javalib/myjar_stem.jar")
+ ensureContains(t, copyCmds, "image.apex/javalib/myjar_dex.jar")
// .. but not for java libs
ensureNotContains(t, copyCmds, "image.apex/javalib/myotherjar.jar")
ensureNotContains(t, copyCmds, "image.apex/javalib/msharedjar.jar")