Skip to content

Commit 2d9145d

Browse files
committed
Make a global test task
Change-Id: I9cd6226cf3e724582ae479cc0bf016098d1b89ee
1 parent 195f497 commit 2d9145d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ android:
1616
- 'android-sdk-license-.+'
1717
- 'google-gdk-license-.+'
1818
script:
19-
- ./gradlew clean test :library:prepareArtifacts
19+
- ./gradlew clean :library:testAll :library:prepareArtifacts

library/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ def bintrayUploadTasks() {
5656
}.toArray()
5757
}
5858

59+
/**
60+
* Returns a list of tasks names to test submodules.
61+
*/
62+
def testTasks() {
63+
return project.ext.submodules.collect { name ->
64+
":${name}:test"
65+
}.toArray()
66+
}
67+
5968
/**
6069
* Prepare artifacts for this an all sub-projects.
6170
*/
@@ -93,3 +102,9 @@ task bintrayUploadAll(dependsOn: [
93102
bintrayUploadTasks()]) {
94103

95104
}
105+
106+
/**
107+
* Test all submodules.
108+
*/
109+
task testAll(dependsOn: [testTasks()]) {
110+
}

0 commit comments

Comments
 (0)