[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider 3377d9d0ad 2/4: Document Gradle usage
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cider 3377d9d0ad 2/4: Document Gradle usage |
Date: |
Sat, 30 Jul 2022 23:58:07 -0400 (EDT) |
branch: elpa/cider
commit 3377d9d0ad5f17fb19b3ae62c530f54a78d69f05
Author: Andrew Oberstar <andrew.oberstar@outlook.com>
Commit: Andrew Oberstar <andrew.oberstar@outlook.com>
Document Gradle usage
Filled out the missing pieces where other build tools where mentioned
and Gradle wasn't or was incomplete.
---
.../ROOT/pages/basics/middleware_setup.adoc | 24 +++++++++++++++++++---
doc/modules/ROOT/pages/basics/up_and_running.adoc | 6 ++----
doc/modules/ROOT/pages/cljs/configuration.adoc | 2 ++
doc/modules/ROOT/pages/cljs/up_and_running.adoc | 15 ++++++++++++++
4 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/doc/modules/ROOT/pages/basics/middleware_setup.adoc
b/doc/modules/ROOT/pages/basics/middleware_setup.adoc
index 259542f228..df9e54b9f2 100644
--- a/doc/modules/ROOT/pages/basics/middleware_setup.adoc
+++ b/doc/modules/ROOT/pages/basics/middleware_setup.adoc
@@ -12,7 +12,8 @@ automatically injects this middleware and other dependencies
as required.
NOTE: In the past, if you were setting up CIDER, you might have had to
modify `profiles.clj` or `profile.boot`. CIDER now handles
everything automatically and you don't need to add anything
-special to these files. The same is true of your `deps.edn` file.
+special to these files. The same is true of your `deps.edn` file and
+your `build.gradle` (as of Clojurephant 0.7.0-alpha.6).
If you prefer a standalone REPL, you will need to invoke
`cider-connect` instead of `cider-jack-in` and manually add the
@@ -45,7 +46,7 @@ A minimal `profiles.clj` for CIDER would be:
[source,clojure]
----
-{:repl {:plugins [[cider/cider-nrepl "0.28.4"]
+{:repl {:plugins [[cider/cider-nrepl "0.28.5"]
[mx.cider/enrich-classpath "1.9.0"]]}}
----
@@ -95,7 +96,24 @@ run `cider-connect` or `cider-connect-cljs`.
=== Using Gradle
-NOTE: This section is currently a stub. Contributions welcome!
+NOTE: Make sure you're using
https://github.com/clojurephant/clojurephant[Clojurephant] 0.4.0 or newer.
+
+.build.gradle
+[source, groovy]
+----
+dependencies {
+ devImplementation 'nrepl:nrepl:0.9.0'
+ devImplementation 'cider:cider-nrepl:0.28.5'
+}
+
+tasks.named('clojureRepl') {
+ middleware = ['cider.nrepl/cider-middleware']
+}
+----
+
+You can then launch the nREPL server from the command line via: `./gradlew
clojureRepl`.
+
+For more information, see the https://clojurephant.dev[Clojurephant docs].
=== Using Maven
diff --git a/doc/modules/ROOT/pages/basics/up_and_running.adoc
b/doc/modules/ROOT/pages/basics/up_and_running.adoc
index c435a5e151..dc4725f79c 100644
--- a/doc/modules/ROOT/pages/basics/up_and_running.adoc
+++ b/doc/modules/ROOT/pages/basics/up_and_running.adoc
@@ -88,6 +88,8 @@ Here's how you can modify the injected dependencies for
`cider-jack-in-clj`:
"foo/bar" "1.0")
----
+IMPORTANT: Always use the fully qualified `group/artifact` (e.g.
`re-frame/re-frame`) in these dependencies, since only Leiningen supports the
bare `re-frame` syntax.
+
CIDER will also inject the most recent version of nREPL that it supports. This
is a simple
trick to override the version of nREPL bundled with your build tool (e.g.
Leiningen), so you can gain
access to the newest nREPL features. Generally that's one aspect of CIDER's
inner workings
@@ -104,10 +106,6 @@ for example, if your project defaults to an older version
of Clojure than that
supported by the CIDER middleware. Set `cider-jack-in-auto-inject-clojure`
appropriately to enable this.
-NOTE: CIDER does not currently support
-dependency auto-injection for Gradle projects. Unfortunately there's no
-way to pass extra dependencies to Gradle via its command-line interface.
-
=== Jacking-in without a Project
If you try to run `cider-jack-in` outside a project
diff --git a/doc/modules/ROOT/pages/cljs/configuration.adoc
b/doc/modules/ROOT/pages/cljs/configuration.adoc
index 89f6ea1770..1ef79bde74 100644
--- a/doc/modules/ROOT/pages/cljs/configuration.adoc
+++ b/doc/modules/ROOT/pages/cljs/configuration.adoc
@@ -17,6 +17,8 @@ variable. Here's an example:
(cider-add-to-alist 'cider-jack-in-cljs-dependencies "weasel/weasel" "0.7.1")
----
+IMPORTANT: Always use the fully qualified `group/artifact` (e.g.
`re-frame/re-frame`) in these dependencies, since only Leiningen supports the
bare `re-frame` syntax.
+
Typically, modifying this variable is not needed, as ClojureScript
dependencies are declared
explicitly in your project configuration most of the time.
diff --git a/doc/modules/ROOT/pages/cljs/up_and_running.adoc
b/doc/modules/ROOT/pages/cljs/up_and_running.adoc
index 69cbcbb28d..2b4345b90e 100644
--- a/doc/modules/ROOT/pages/cljs/up_and_running.adoc
+++ b/doc/modules/ROOT/pages/cljs/up_and_running.adoc
@@ -55,6 +55,21 @@ or in `deps.edn`:
"[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]}}}
----
+or in `build.gradle`:
+
+[source, groovy]
+----
+dependencies {
+ devImplementation 'nrepl:nrepl:0.9.0'
+ devImplementation 'cider:cider-nrepl:0.28.5'
+ devImplementation 'cider:cider-piggieback:0.5.3'
+}
+
+tasks.named('clojureRepl') {
+ middleware = ['cider.nrepl/cider-middleware',
'cider.piggieback/wrap-cljs-repl']
+}
+----
+
== Starting a ClojureScript REPL
Open a ClojureScript file in your project and type kbd:[M-x]