Created
October 7, 2011 22:43
-
-
Save Dierk/1271516 to your computer and use it in GitHub Desktop.
build.gradle for setting up a new gradle-based project
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
apply plugin:'groovy' | |
apply plugin:'idea' | |
repositories { mavenCentral() } | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.2' | |
} | |
task makeDirs(description:'make all dirs for project setup') << { | |
def sources = [sourceSets.main, sourceSets.test] | |
sources*.allSource*.srcDirs.flatten().each { File srcDir -> | |
println "making $srcDir" | |
srcDir.mkdirs() | |
} | |
} | |
task wrap(type:Wrapper, description:"create a gradlew") { | |
gradleVersion = '1.0-milestone-4' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
copy this file into a new, empty project dir and call "gradle mD" to set up the project directories or "gradle wrap" to create the wrapper