Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clojure and Clojurescript support for Gradle

License

NotificationsYou must be signed in to change notification settings

clojurephant/clojurephant

Repository files navigation

Formerly known as "gradle-clojure"

CIcljdoc

What is this?

A Gradle plugin providing support for the Clojure and ClojureScript languages.

NOTE: clojurephant should not be considered stable until 1.0.0. Until then, minor versions (e.g. 0.1.0 to 0.2.0) will likely contain breaking changes.

Clojure Features

  • Packaging Clojure code (and/or AOT compiled classes) into a JAR
  • Package an Uberjar (via the GradleShadow plugin)
  • AOT compilation
  • Running clojure.test tests (integrated into Gradle'sTest task)
  • Running an nREPL server (supports custom middlewares or handler)

ClojureScript Features

NOTE: ClojureScript features are pretty new, so let us know if you run into issues or have ideas for improvement.

  • Packaging Clojure code (or compiled JS) into a JAR or ZIP
  • ClojureScript compilation (multiple builds supported)

Why should you care?

The goal is to provide the same creature comforts thatLeiningen andBoot do for Clojure/ClojureScript development, while also leveraging Gradle's unique features:

  • Strong support for polyglot projects
  • Strong support for multi-project builds
  • Largeplugin ecosystem

Usage

See theRelease Notes for available versions, compatibility with Gradle, Java, and Clojure, and detailed change notes.

This plugin assumes you're using a sane layout for your Clojure code - namespaces correspondingto your source code layout, and one namespace per file. The plugin uses the filenames tocalculate the namespaces involved, it does not parse the files looking forns forms.

Quick Start

Look at our sample projects:

Common Commands

  • ./gradlew test Executes your clojure.test tests (and any other JUnit tests in your build).
  • ./gradlew clojureRepl Starts an nREPL server (on a random port by default).

build.gradle

plugins {  id"dev.clojurephant.clojure" version"<version>"}// You need to add clojars for the plugin to work.repositories {  maven {    name='Clojars'// name can be ommitted, but is helpful in troubleshooting    url='https://repo.clojars.org/'  }}dependencies {// requires a version of Clojure with prepl (1.10+)  implementation'org.clojure:clojure:1.11.1'// and any other dependencies you want on the compile classpath// implementation 'group:artifact:version'// needed for test integration  testRuntimeOnly'dev.clojurephant:jovial:0.4.2'// and any other test-specific dependencies// testImplementation 'group:artifact:version'// dependencies for REPL use only  devImplementation'org.clojure:tools.namespace:1.3.0'}// needed for test integrationtasks.withType(Test) {  useJUnitPlatform()}

See all available options in thedocs.

Getting help

Read the online Clojurephant documentationhttps://clojurephant.dev.

For questions or support, please visit theClojurephant Discussions,ClojureVerse gradle-clojure channel or theClojurian's Slack #gradle channel

For bug reports and feature requests, please use the repo'sissues.

Contributing

See theguidelines for details on how you can contribute.

Acknowledgements

This project started from thecursive.clojure plugin by Colin Fleming (@cmf, original author) and Piotrek Bzdyl (@pbzdyl).

Thanks to John Szakmeister (@jszakmeister) for organizing a call with Gradle to get us started in the right direction.

Thanks to allour contributors.


[8]ページ先頭

©2009-2025 Movatter.jp