I'm trying to use gradle/Clojuresque to build clojure code, run it, and get uberjar. I use hints from http://dev.clojure.org/display/doc/Getting+Started+with+Gradle, https://bitbucket.org/kotarak/clojuresque/wiki/Getting%20Started, and 'Could not find us.bpsm:edn-java:0.4.3' error with Gradle for Clojure (Clojuresque).
This is the grade script.
buildscript {
repositories {
maven { url "http://clojars.org/repo" }
mavenCentral()
}
dependencies {
classpath "clojuresque:clojuresque:1.7.0"
}
}
apply plugin: 'clojure'
clojure.aotCompile = true
repositories {
flatDir dirs: project.file("lib/runtime")
maven { url "http://clojars.org/repo" }
}
With gradle build
task, there is no error and I have a jar file, but I don't see any class file generated; I don't think the generated jar contains nothing, especially when I compared the results from manual build (Compile clojure source into class (AOT) from command line (not using lein)).
.
├── build
│ ├── libs
│ │ └── clojure.jar
│ └── tmp
│ └── jar
│ └── MANIFEST.MF
├── build.gradle
└── src
└── hello
└── core.clj
This is the core.clj
(ns hello.core
(:gen-class))
(defn -main
"This should be pretty simple."
[]
(println "Hello, World!"))
What might be wrong? Also, how to run the code and get uberjar like lein run
and lein uberjar
does?
I zipped the directory in https://dl.dropboxusercontent.com/u/10773282/share/2015/clojure_test.zip