Skip to content

Instantly share code, notes, and snippets.

@xconnecting
Created November 29, 2012 00:37
Show Gist options
  • Save xconnecting/4165870 to your computer and use it in GitHub Desktop.
Save xconnecting/4165870 to your computer and use it in GitHub Desktop.
Gradle: Define dependency in custom plugin
class Greeting implements Plugin<Project> {
void apply(Project project) {
project.task('first', type: FirstTask)
project.task('second', type: SecondTask)
.dependsOn('first')
}
}
class FirstTask extends DefaultTask {
@TaskAction
def greet() {
println 'first'
}
}
class SecondTask extends DefaultTask {
@TaskAction
def greet() {
println 'second'
}
}
apply plugin: Greeting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment