Skip to content

Commit

Permalink
Add description to newly created Gradle tasks (cashapp#910)
Browse files Browse the repository at this point in the history
Co-authored-by: John Rodriguez <[email protected]>
  • Loading branch information
SimonMarquis and jrodbx authored May 31, 2023
1 parent 71268eb commit 0f3ed17
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,14 @@ class PaparazziPlugin : Plugin<Project> {
val nativePlatformFileCollection = project.setupNativePlatformDependency()

// Create anchor tasks for all variants.
val verifyVariants = project.tasks.register("verifyPaparazzi")
val recordVariants = project.tasks.register("recordPaparazzi")
val verifyVariants = project.tasks.register("verifyPaparazzi") {
it.group = VERIFICATION_GROUP
it.description = "Run screenshot tests for all variants"
}
val recordVariants = project.tasks.register("recordPaparazzi") {
it.group = VERIFICATION_GROUP
it.description = "Record golden images for all variants"
}

val variants = project.extensions.getByType(LibraryExtension::class.java)
.libraryVariants
Expand Down Expand Up @@ -147,10 +153,12 @@ class PaparazziPlugin : Plugin<Project> {

val recordTaskProvider = project.tasks.register("recordPaparazzi$variantSlug", PaparazziTask::class.java) {
it.group = VERIFICATION_GROUP
it.description = "Record golden images for variant '${variant.name}'"
}
recordVariants.configure { it.dependsOn(recordTaskProvider) }
val verifyTaskProvider = project.tasks.register("verifyPaparazzi$variantSlug", PaparazziTask::class.java) {
it.group = VERIFICATION_GROUP
it.description = "Run screenshot tests for variant '${variant.name}'"
}
verifyVariants.configure { it.dependsOn(verifyTaskProvider) }

Expand Down

0 comments on commit 0f3ed17

Please sign in to comment.