Last active
April 22, 2016 14:47
-
-
Save pintowar/ec155089a8e3f89d260782004cc06601 to your computer and use it in GitHub Desktop.
Gradle script to run a clojure project
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
plugins { | |
id "de.kotka.clojuresque.nrepl" version "2.0.0" | |
} | |
apply plugin: 'application' | |
clojure { | |
warnOnReflection = true | |
aotCompile = true | |
} | |
//To execute src/main/clojure/poc/core.clj file | |
mainClassName = "poc.core" | |
repositories { | |
jcenter() | |
} | |
// In this section you declare the dependencies for your production and test code | |
dependencies { | |
compile 'org.slf4j:slf4j-api:1.7.14' | |
compile 'org.clojure:clojure:1.8.0' | |
compile 'org.clojure:tools.nrepl:0.2.12' | |
testCompile 'junit:junit:4.12' | |
} | |
task repl(type: JavaExec) { | |
classpath project.sourceSets.main.clojure.srcDirs, | |
project.sourceSets.test.clojure.srcDirs, | |
sourceSets.test.runtimeClasspath, | |
sourceSets.main.runtimeClasspath | |
main = "clojure.main" | |
standardInput = System.in | |
} |
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
(ns poc.core | |
(:gen-class)) | |
(defn -main [] | |
"I can say 'Hello World'." | |
(println "Hello, World!")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment