|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD | |||||||
java.lang.Objectorg.gradle.api.DefaultTask
clojuresque.tasks.ClojureRepl
class ClojureRepl extends DefaultTask
Starts a nrepl server for the project. To provide your own handler, eg. to use custom nrepl middlewares, put the code into a separate sourceSet and tell the task to use your specific handler factory.
sourceSets { dev }
clojureRepl {
handler = "my.repl/handler"
}
And in src/dev/clojure/my/repl.clj:
(ns my.repl
(:require
[clojure.tools.nrepl.server :as repl]))
(defn handler
[]
(repl/default-handler #'my-middleware))
Note: You have to specify the nrepl version to use
manually. Eg. by using the “development” configuration or
as part of your application.
build.gradle
is touched between the runs. Then the repl has to be stopped
and restarted afresh to allow again parallel builds.| Property Summary | |
|---|---|
java.lang.Object |
classpath
|
java.lang.Object |
handler
|
java.lang.Object |
jvmOptions
|
java.lang.Object |
port
|
| Method Summary | |
|---|---|
java.lang.Object
|
classpath(java.lang.Object... fs)
|
void
|
startRepl()
|
| Property Detail |
|---|
@InputFiles @Delayed java.lang.Object classpath
java.lang.Object handler
@Delayed java.lang.Object jvmOptions
java.lang.Object port
| Method Detail |
|---|
java.lang.Object classpath(java.lang.Object... fs)
@TaskAction void startRepl()
Groovy Documentation