Groovy Documentation

clojuresque.tasks
[Groovy] Class ClojureRepl

java.lang.Object
  org.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.

Caveats


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

classpath

@InputFiles
@Delayed
java.lang.Object classpath


handler

java.lang.Object handler


jvmOptions

@Delayed
java.lang.Object jvmOptions


port

java.lang.Object port


 
Method Detail

classpath

java.lang.Object classpath(java.lang.Object... fs)


startRepl

@TaskAction
void startRepl()


 

Groovy Documentation