Permalink
Browse files

- adding final example of Rule

  • Loading branch information...
1 parent 6bfa513 commit 445cc6aea172e4d7de9d4ade37ff88a2d75950a9 @kellyrob99 committed Sep 18, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 build.gradle
View
9 build.gradle
@@ -66,3 +66,12 @@ task importTasksRunInOrder(type: GradleBuild) { GradleBuild antBuild ->
antBuild.buildFile ='buildWithClean.gradle'
antBuild.tasks = ['dist', 'clean']
}
+
+tasks.addRule("Pattern: a-<target> will execute a single <target> in the ant build") { String taskName ->
+ if (taskName.startsWith("a-")) {
+ task(taskName, type: GradleBuild) {
+ buildFile = 'buildWithClean.gradle'
+ tasks = [taskName - 'a-']
+ }
+ }
+}

0 comments on commit 445cc6a

Please sign in to comment.