Created
August 5, 2019 14:56
-
-
Save ghale/82904d5c411a4fdf17306bf4f0f23590 to your computer and use it in GitHub Desktop.
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
apply plugin: DbPlugin | |
tasks.register("subtask1") | |
tasks.register("subtask2") | |
tasks.named("fixDbPermissions") { | |
addStep subtask1 | |
addStep subtask2 | |
} | |
class DbPlugin implements Plugin<Project> { | |
void apply(Project project) { | |
def createMinDb = project.tasks.register("createMinDb") | |
def fixDbPerms = project.tasks.register("fixDbPermissions") { | |
dependsOn createMinDb | |
ext.addStep = { subtask -> | |
dependsOn subtask | |
subtask.mustRunAfter createMinDb | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment