Last active
August 19, 2024 16:09
-
-
Save gerin98/cca97da3e2285a4a398d6ffaf543004f to your computer and use it in GitHub Desktop.
[Blogpost] Creating a gradle plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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