Skip to content

Instantly share code, notes, and snippets.

@xconnecting
Created November 6, 2012 01:05
Show Gist options
  • Save xconnecting/4021755 to your computer and use it in GitHub Desktop.
Save xconnecting/4021755 to your computer and use it in GitHub Desktop.
Sample: Gradle custom task in build.gradle
task hello (type: GreetingTask){
}
task hi (type: GreetingTask){
greeting = 'Hi'
}
class GreetingTask extends DefaultTask {
def greeting = 'Hello'
@TaskAction
def greet() {
println greeting
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment