|
|
|
|
|
by vorg
4421 days ago
|
|
> I personally prefer Gradle’s nice DSL [...] in order to use Gradle one does not need to know Groovy, even if one wishes to do some non-standard stuff [...] I just learned a few useful Groovy expressions that I found in Gradle examples online The DSL is Groovy syntax from Groovy's antiquated Antlr 2.7 grammar, so simply by using Gradle you're using Groovy along with all its warts. Underneath, Gradle isn't so much a DSL as an API shipping with a programming language. You could just as easily write the first Gradle example from the article in most other JVM languages. If it was in Clojure... (require gradle :as g)
(g/apply :plugin "java")
(g/apply :plugin "application")
(g/source-compatibility "1.8")
(g/main-class-name "jmodern.Main")
(g/repositories
(g/maven-central))
(g/configurations
g/quasar)
(g/dependencies
(g/compile "co.paralleluniverse:quasar-core:0.5.0:jdk8")
(g/compile "co.paralleluniverse:quasar-actors:0.5.0")
(g/quasar "co.paralleluniverse:quasar-core:0.5.0:jdk8")
(g/test-compile "junit:junit:4.11"))
(g/run
(g/jvm-args (str "-javaagent:" (-> (configurations.quasar.iterator) next))))
|
|