Set JAVA_HOME for runtime via soong AndroidTest.xml template
The jdk used by Robolectric during tests should always be the ANDROID_JAVA_HOME, as such this change, reads that environment variable from the build, and uses it to set the java_folder via the {EXTRA_CONFIGS} in the build/core/robolectric_test_config_template.xml
Test: atest MyRoboTests and look at the generated xml file
Bug: 372520027
Change-Id: Ie63da8602224279f7920c124762cfc29f714c7e1
diff --git a/core/robolectric_test_config_template.xml b/core/robolectric_test_config_template.xml
index 2e4f700..509ac7b 100644
--- a/core/robolectric_test_config_template.xml
+++ b/core/robolectric_test_config_template.xml
@@ -18,7 +18,6 @@
<option name="test-suite-tag" value="robolectric" />
<option name="test-suite-tag" value="robolectric-tests" />
- <option name="java-folder" value="prebuilts/jdk/jdk21/linux-x86/" />
<option name="exclude-paths" value="java" />
<option name="use-robolectric-resources" value="true" />