Note
|
We’re working on adding an out-of-box project type for Gradle to Calva. That will simplify the usage described here. |
Once you’re jacked-in or connected, see Calva’s documentation for usage information.
If you want to control the dependencies yourself, here are the needed changes to manually configure your project for use with Calva.
dependencies {
devImplementation 'cider:cider-nrepl:{cider-nrepl-version}'
}
clojureRepl {
middleware = ['cider.nrepl/cider-middleware']
}
Create a custom Calva connect sequence in your user or workspace settings.json
.
{
"calva.replConnectSequences": [
{
"name": "Custom Gradle",
"projectType": "generic",
"nReplPortFile": [
".nrepl-port"
],
"cljsType": "none"
}
]
}
Start your nREPL server.
$ ./gradlew clojureRepl
Optionally, omit the middleware from the build.gradle
and include it on the commandline:
$ ./gradlew clojureRepl --middleware=cider.nrepl/cider-middleware
Then Calva: Connect to a Runnig REPL Server in the Project
(CTRL+ALT+C CTRL+ALT+C
). Choose the Custom Gradle
project type. Calva will pick up the port automatically.
Start your nREPL server.
$ ./gradlew clojureRepl
Optionally, omit the middleware from the build.gradle
and include it on the commandline:
$ ./gradlew clojureRepl --middleware=cider.nrepl/cider-middleware
Then Calva: Connect to a Runnig REPL Server in the Project
(CTRL+ALT+C CTRL+ALT+C
). Choose the Generic
project type and input the REPL port from your Gradle output.