Skip to content

Instantly share code, notes, and snippets.

@gerin98
Last active August 19, 2024 16:09
Show Gist options
  • Save gerin98/cca97da3e2285a4a398d6ffaf543004f to your computer and use it in GitHub Desktop.
Save gerin98/cca97da3e2285a4a398d6ffaf543004f to your computer and use it in GitHub Desktop.
[Blogpost] Creating a gradle plugin
class FilterUnitTestsPlugin : Plugin<Project> {
override fun apply(project: Project) {
val result = FilterUnitTests().getResult(project)
project.tasks.withType<AndroidUnitTest> {
filter {
setIncludePatterns(*result.toTypedArray())
isFailOnNoMatchingTests = false
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment