Skip to content

Commit ee41c84

Browse files
Impved tasks documentation
1 parent 858c6d2 commit ee41c84

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

plugin/src/main/java/com/appunite/firebasetestlabplugin/FirebaseTestLabPlugin.kt

+19-5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
7373
val gsutil = File(sdkPath, Constants.GSUTIL)
7474

7575
project.task(ensureGCloudSdk, {
76+
group = Constants.FIREBASE_TEST_LAB
77+
description = "Check if google cloud sdk is installed"
78+
7679
doFirst {
7780
if (!gcloud.exists()) {
7881
throw IllegalStateException("gcloud does not exist in path ${sdkPath.absoluteFile}, but downloading is not supported on Windows")
@@ -99,6 +102,9 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
99102
val gsutil = File(sdkPath, Constants.GSUTIL)
100103

101104
project.createTask(ensureGCloudSdk, HiddenExec::class, {
105+
group = Constants.FIREBASE_TEST_LAB
106+
description = "Install google cloud SDK if necessary"
107+
102108
outputs.files(gcloud, gsutil)
103109
doFirst {
104110
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
@@ -127,6 +133,9 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
127133
val sdk = createDownloadSdkTask(project, cloudSdkPath)
128134

129135
project.createTask(taskAuth, HiddenExec::class, {
136+
group = Constants.FIREBASE_TEST_LAB
137+
description = "Authorize google cloud sdk"
138+
130139
dependsOn(ensureGCloudSdk)
131140
val keyFile = keyFile
132141
doFirst {
@@ -139,6 +148,9 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
139148
commandLine = listOf(sdk.gcloud.absolutePath, "auth", "activate-service-account", "--key-file=${keyFile?.absolutePath}")
140149
})
141150
project.createTask(taskSetProject, HiddenExec::class, {
151+
group = Constants.FIREBASE_TEST_LAB
152+
description = "Configure google cloud sdk project"
153+
142154
dependsOn(ensureGCloudSdk)
143155
doFirst {
144156
if (googleProjectId == null) {
@@ -148,6 +160,9 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
148160
commandLine = listOf(sdk.gcloud.absolutePath, "config", "set", "project", "$googleProjectId")
149161
})
150162
project.task(taskSetup, {
163+
group = Constants.FIREBASE_TEST_LAB
164+
description = "Setup and configure google cloud sdk"
165+
151166
dependsOn(taskSetProject)
152167
dependsOn(taskAuth)
153168
})
@@ -177,9 +192,6 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
177192
project.logger
178193
)
179194

180-
181-
182-
183195
(project.extensions.findByName(ANDROID) as AppExtension).apply {
184196
testVariants.toList().forEach { testVariant ->
185197
createGroupedTestLabTask(TestType.INSTRUMENTATION, devices, testVariant, firebaseTestLabProcessCreator, ignoreFailures, downloader)
@@ -209,7 +221,7 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
209221
if (downloader != null) {
210222
project.task(cleanTask, closureOf<Task> {
211223
group = Constants.FIREBASE_TEST_LAB
212-
description = "Clean test lab artifacts"
224+
description = "Clean test lab artifacts on google storage"
213225
dependsOn(taskSetup)
214226
doLast {
215227
downloader.clearResultsDir()
@@ -257,6 +269,8 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
257269
}
258270

259271
project.task(runTestsTask, closureOf<Task> {
272+
group = Constants.FIREBASE_TEST_LAB
273+
description = "Run Android Tests in Firebase Test Lab"
260274
dependsOn(tasks)
261275

262276
doFirst {
@@ -278,7 +292,7 @@ internal class FirebaseTestLabPlugin : Plugin<Project> {
278292
if (downloader != null) {
279293
project.task(downloadTask, closureOf<Task> {
280294
group = Constants.FIREBASE_TEST_LAB
281-
description = "Run Android Tests in Firebase Test Lab and download artifacts"
295+
description = "Run Android Tests in Firebase Test Lab and download artifacts from google storage"
282296
dependsOn(taskSetup)
283297
dependsOn(runTestsTask)
284298
mustRunAfter(cleanTask)

plugin/src/main/java/com/appunite/firebasetestlabplugin/model/Device.kt

-8
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ class Device(val name: String) {
99

1010
var testUniversalApk: Boolean = true
1111

12-
fun filterAbis(vararg filter: String) {
13-
abiSplits = setOf(*filter)
14-
filterAbiSplits = true
15-
}
16-
fun filterAbis(filter: Set<String>) {
17-
abiSplits = filter
18-
filterAbiSplits = true
19-
}
2012
var filterAbiSplits = false
2113
var abiSplits: Set<String> = setOf()
2214
}

plugin/src/test/java/com/appunite/firebasetestlabplugin/IntegrationTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class IntegrationTest {
254254
keyFile = File(simpleProject, "key.json")
255255
createDevice("myDevice", {
256256
deviceIds = listOf("Nexus6")
257-
filterAbis()
257+
filterAbiSplits = true
258258
})
259259
}
260260
(project as ProjectInternal).evaluate()

0 commit comments

Comments
 (0)