-
-
Save djKianoosh/1434270 to your computer and use it in GitHub Desktop.
build.gradle for setting up a new gradle-based project for use with clojure & clojuresque
This file contains hidden or 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:'project-report' | |
buildscript { | |
repositories { | |
maven { | |
name 'clojars' | |
url 'http://clojars.org/repo' | |
} | |
} | |
dependencies { | |
classpath 'clojuresque:clojuresque:1.4.4' | |
} | |
} | |
apply plugin:'clojure' | |
warnOnReflection = true | |
aotCompile = true | |
repositories { | |
mavenLocal() | |
clojarsRepo() | |
mavenCentral() | |
} | |
dependencies { | |
groovy 'org.codehaus.groovy:groovy-all:1.8.4' | |
compile 'org.clojure:clojure:1.3.0' | |
} | |
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-6' | |
} | |
Latest version has no deprecation warnings, with clojuresque 1.4.4 (was using 1.4.2 before)... still would like to test it out with some real(ish) clojure code..
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: not tested with actual clojure code (yet!).. But 'gradle makeDirs' does create the initial project tree structure, though there are some warnings from gradle with the makeDirs task itself:
The SourceSet.getClassesDir() method is deprecated and will be removed in the next version of Gradle. You should use the getOutput().getClassesDir() method instead.
The 'urls' property of the RepositoryHandler.mavenRepo() method is deprecated and will be removed in a future version of Gradle. You should use the 'url' property to define the core maven repository & the 'artifactUrls' property to define any additional artifact locations.