Introduce a Soong `java_defaults` module for ART run-tests.

Test: atest art-run-test-001-HelloWorld
Bug: 147814778
Bug: 147812905
Change-Id: I93655228f47a566e700f61d7040a41aceb9b5e87
diff --git a/test/001-HelloWorld/Android.bp b/test/001-HelloWorld/Android.bp
index 30aaf39..6f94b55 100644
--- a/test/001-HelloWorld/Android.bp
+++ b/test/001-HelloWorld/Android.bp
@@ -1,8 +1,5 @@
 java_test {
     name: "art-run-test-001-HelloWorld",
+    defaults: ["art-run-test-defaults"],
     srcs: ["src/*.java"],
-    sdk_version: "core_platform",
-    data: ["expected.txt"],
-    test_config_template: ":art-run-test-template",
-    test_suites: ["general-tests"],
 }
diff --git a/test/Android.bp b/test/Android.bp
index 3ac58ac..6efd4e0 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -193,6 +193,17 @@
     ],
 }
 
+java_defaults {
+    name: "art-run-test-defaults",
+    // Compile against the "core" bootclasspath, not the "default" one (current
+    // platform). See also function `javac_with_bootclasspath` in
+    // `test/etc/default-build`, as well as `art/test/etc/default-build`).
+    sdk_version: "core_platform",
+    data: ["expected.txt"],
+    test_config_template: ":art-run-test-template",
+    test_suites: ["general-tests"],
+}
+
 art_cc_test_library {
     name: "libarttest",
     defaults: ["libarttest-defaults"],