Last active
April 10, 2025 03:00
-
-
Save gerin98/9b1c30b97760424f7cf8857ee7ce9ce5 to your computer and use it in GitHub Desktop.
the plugin to generate a flank script
This file contains hidden or 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 E2ETestGradlePlugin : Plugin<Project> { | |
| override fun apply(project: Project) { | |
| project.afterEvaluate { | |
| tasks.apply { | |
| createTasksForConfig() | |
| } | |
| } | |
| } | |
| fun TaskContainer.createTasksForConfig() { | |
| val config = TestTargetsConfig() | |
| register("filesChangedE2ETest", TestTargetsTask::class.java).configure { | |
| testTargetsConfig.set(config) | |
| } | |
| register("writeFlankConfigE2ETest", YamlConfigWriterTask::class.java, config).configure { | |
| outputs.upToDateWhen { false } | |
| dependsOn( | |
| named("filesChangedE2ETest"), | |
| ) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment