Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- println 'Above all stuff'
- task hello {
- println 'Inside hello, before doLast'
- doLast {
- println "Hello World"
- println 'Inside hello, Inside do doLast'
- }
- println 'Inside hello, after doLast'
- }
- println 'Between hello and date'
- task date(dependsOn: hello) { // Can put a collection
- // dependsOn hello
- dependsOn 'hi', 'whatUp'
- println 'Inside date, before doLast'
- doLast {
- println new Date()
- }
- }
- println 'After every stuff'
- task hi(type: Greeting)
- task whatUp(type: Greeting) {
- user = 'Amadeu'
- }
- class Greeting extends DefaultTask {
- String user = 'Pedro'
- @TaskAction
- void sayHello() {
- println "Hello, $user!"
- }
- }
Add Comment
Please, Sign In to add comment