apex respects stem of java_library modules
apex now respects stem of java_library modules.
As a follow-up we need to suppor the same for other types of modules.
Exempt-From-Owner-Approval: cherry-pick from AOSP
Bug: 157638999
Test: m
Merged-In: Iaf5023020b5440f1ffd4f5414b5a7864655fc22a
(cherry picked from commit a62aa2399031a01620775a06dbae53af0cff5a25)
Change-Id: Iaf5023020b5440f1ffd4f5414b5a7864655fc22a
diff --git a/apex/apex_test.go b/apex/apex_test.go
index a2d7a97..89f8c89 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -386,6 +386,7 @@
java_library {
name: "myjar",
srcs: ["foo/bar/MyClass.java"],
+ stem: "myjar_stem",
sdk_version: "none",
system_modules: "none",
static_libs: ["myotherjar"],
@@ -440,7 +441,7 @@
// Ensure that both direct and indirect deps are copied into apex
ensureContains(t, copyCmds, "image.apex/lib64/mylib.so")
ensureContains(t, copyCmds, "image.apex/lib64/mylib2.so")
- ensureContains(t, copyCmds, "image.apex/javalib/myjar.jar")
+ ensureContains(t, copyCmds, "image.apex/javalib/myjar_stem.jar")
// .. but not for java libs
ensureNotContains(t, copyCmds, "image.apex/javalib/myotherjar.jar")
ensureNotContains(t, copyCmds, "image.apex/javalib/msharedjar.jar")