Add `android_ravenwood_test` build rule
Since we're unable to compile libcore classes for the device,
we temporarily pivot usages to our own copy of EmptyArray.
Bug: 292141694
Test: m nothing --no-skip-soong-tests
Test: m hoststubgen ravenwood-runtime tradefed atest && atest-dev HostStubGenTest-framework-test
Change-Id: I9d4ff559924e47725eb3e897aaf2cc93e9b1a193
diff --git a/Ravenwood.bp b/Ravenwood.bp
index da02298..1582266 100644
--- a/Ravenwood.bp
+++ b/Ravenwood.bp
@@ -13,7 +13,7 @@
// limitations under the License.
// We need this "trampoline" rule to force soong to give a host-side jar to
-// framework-minus-apex.ravenwood. Otherwise, soong would mix up the arch (?) and we'd get
+// framework-minus-apex.ravenwood-base. Otherwise, soong would mix up the arch (?) and we'd get
// a dex jar.
java_library {
name: "framework-minus-apex-for-hoststubgen",
@@ -26,7 +26,7 @@
}
// Generate the stub/impl from framework-all, with hidden APIs.
-java_genrule_host {
+java_genrule {
name: "framework-minus-apex.ravenwood-base",
tools: ["hoststubgen"],
cmd: "$(location hoststubgen) " +
@@ -57,7 +57,9 @@
}
// Extract the impl jar from "framework-minus-apex.ravenwood-base" for subsequent build rules.
-java_genrule_host {
+// Note this emits a "device side" output, so that ravenwood tests can (implicitly)
+// depend on it.
+java_genrule {
name: "framework-minus-apex.ravenwood",
defaults: ["hoststubgen-for-prototype-only-genrule"],
cmd: "cp $(in) $(out)",
@@ -68,3 +70,17 @@
"framework-minus-apex.ravenwood.jar",
],
}
+
+android_ravenwood_libgroup {
+ name: "ravenwood-runtime",
+ libs: [
+ "framework-minus-apex.ravenwood",
+ "hoststubgen-helper-runtime.ravenwood",
+ "hoststubgen-helper-framework-runtime.ravenwood",
+ ],
+}
+
+android_ravenwood_libgroup {
+ name: "ravenwood-utils",
+ libs: [],
+}