Created
July 20, 2015 13:59
-
-
Save jccartwright/7791a57fc08495e14400 to your computer and use it in GitHub Desktop.
Gradle copy task
This file contains 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
repositories { | |
mavenCentral() | |
} | |
configurations { | |
dijits | |
} | |
dependencies { | |
compile 'org.codehaus.groovy:groovy-all:2.3.6' | |
dijits 'commons-io:commons-io:2.4' | |
} | |
task first { task -> | |
println "inside task ${task.name}..." | |
doFirst { | |
println "inside doFirst..." | |
} | |
doLast { | |
println "inside doLast..." | |
} | |
} | |
task unzip(type: Copy) { | |
from { // use of closure defers evaluation until execution time | |
configurations.dijits.collect { zipTree(it) } | |
} | |
into "$buildDir/dijits" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment