summaryrefslogtreecommitdiff
path: root/java/robolectric.go
diff options
context:
space:
mode:
author Sasha Smundak <asmundak@google.com> 2022-12-08 10:41:33 -0800
committer Sasha Smundak <asmundak@google.com> 2022-12-12 18:06:49 -0800
commitdcb61292695c740d1fac37a8e06ddfc763cebe83 (patch)
treecdff191ec04182118b0f9ee23c26b9995d92ddb4 /java/robolectric.go
parent18ac53b4d0dac5183eeb9ce7ebc76c76388c32e2 (diff)
Streamline AndroidMk generation
Add AndroidMkEmitAssignList to emit a line to assign the items from the given list of string arrays. Test: treehugger Change-Id: Id5acbef38ea4e91349bd2461f226db352d4b8123
Diffstat (limited to 'java/robolectric.go')
-rw-r--r--java/robolectric.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/java/robolectric.go b/java/robolectric.go
index 938abe138..6e8d5913c 100644
--- a/java/robolectric.go
+++ b/java/robolectric.go
@@ -330,11 +330,10 @@ func (r *robolectricTest) writeTestRunner(w io.Writer, module, name string, test
fmt.Fprintln(w, "")
fmt.Fprintln(w, "include $(CLEAR_VARS)", " # java.robolectricTest")
fmt.Fprintln(w, "LOCAL_MODULE :=", name)
- fmt.Fprintln(w, "LOCAL_JAVA_LIBRARIES :=", module)
- fmt.Fprintln(w, "LOCAL_JAVA_LIBRARIES += ", strings.Join(r.libs, " "))
+ android.AndroidMkEmitAssignList(w, "LOCAL_JAVA_LIBRARIES", []string{module}, r.libs)
fmt.Fprintln(w, "LOCAL_TEST_PACKAGE :=", String(r.robolectricProperties.Instrumentation_for))
fmt.Fprintln(w, "LOCAL_INSTRUMENT_SRCJARS :=", r.roboSrcJar.String())
- fmt.Fprintln(w, "LOCAL_ROBOTEST_FILES :=", strings.Join(tests, " "))
+ android.AndroidMkEmitAssignList(w, "LOCAL_ROBOTEST_FILES", tests)
if t := r.robolectricProperties.Test_options.Timeout; t != nil {
fmt.Fprintln(w, "LOCAL_ROBOTEST_TIMEOUT :=", *t)
}