All Projects → clojurephant → Clojurephant

clojurephant / Clojurephant

Licence: apache-2.0
Clojure and Clojurescript support for Gradle

Programming Languages

java
68154 projects - #9 most used programming language
clojure
4091 projects
clojurescript
191 projects

Projects that are alternatives of or similar to Clojurephant

Gradle S3 Build Cache
An AWS S3 Gradle build cache implementation
Stars: ✭ 54 (-54.24%)
Mutual labels:  gradle, gradle-plugin
Okbuck
OkBuck is a gradle plugin that lets developers utilize the Buck build system on a gradle project.
Stars: ✭ 1,513 (+1182.2%)
Mutual labels:  gradle, gradle-plugin
Gradle Semantic Build Versioning
Gradle plugin to generate version-numbers and tags using semantic versioning
Stars: ✭ 69 (-41.53%)
Mutual labels:  gradle, gradle-plugin
Godot
Keep track of how much time you spend on Gradle builds
Stars: ✭ 113 (-4.24%)
Mutual labels:  gradle, gradle-plugin
Kordamp Gradle Plugins
A collection of Gradle plugins
Stars: ✭ 100 (-15.25%)
Mutual labels:  gradle, gradle-plugin
Enigma
Gradle Plugin - Obfuscator String Encryption (Android/Java)
Stars: ✭ 43 (-63.56%)
Mutual labels:  gradle, gradle-plugin
Androidanimationexercise
Android 动画各种实现,包括帧动画、补间动画和属性动画的总结分享
Stars: ✭ 1,254 (+962.71%)
Mutual labels:  gradle, gradle-plugin
Plantuml Gradle Plugin
Gradle plugin to build PlantUML diagrams from code (for living and up-to-date documentation)
Stars: ✭ 27 (-77.12%)
Mutual labels:  gradle, gradle-plugin
Vertx Gradle Plugin
An opinionated Gradle plugin for Vert.x projects
Stars: ✭ 98 (-16.95%)
Mutual labels:  gradle, gradle-plugin
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-17.8%)
Mutual labels:  gradle, gradle-plugin
Hunter
A fast, incremental, concurrent framework to develop compile plugin for android project to manipulate bytecode
Stars: ✭ 999 (+746.61%)
Mutual labels:  gradle, gradle-plugin
Gradle Build Properties Plugin
Keep your secrets secret. External build properties support for your Gradle scripts.
Stars: ✭ 110 (-6.78%)
Mutual labels:  gradle, gradle-plugin
Gradle Kotlin Aspectj Weaver
A Gradle plugin that allows you to weave your compiled Java and Kotlin files with AspectJ
Stars: ✭ 14 (-88.14%)
Mutual labels:  gradle, gradle-plugin
Auto Manifest
Generates AndroidManifest.xml in simple libraries so that you don't have to
Stars: ✭ 51 (-56.78%)
Mutual labels:  gradle, gradle-plugin
Gradle Defaults
Plugin providing opinionated defaults for Gradle projects.
Stars: ✭ 7 (-94.07%)
Mutual labels:  gradle, gradle-plugin
Gradle Plugins
Gradle Plugin Collection
Stars: ✭ 84 (-28.81%)
Mutual labels:  gradle, gradle-plugin
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+503.39%)
Mutual labels:  gradle, gradle-plugin
Ktlint Gradle
A ktlint gradle plugin
Stars: ✭ 713 (+504.24%)
Mutual labels:  gradle, gradle-plugin
Gradle Buildconfig Plugin
A plugin for generating BuildConstants for any kind of Gradle projects: Java, Kotlin, Groovy, etc. Designed for KTS scripts.
Stars: ✭ 85 (-27.97%)
Mutual labels:  gradle, gradle-plugin
Gradle Changelog Plugin
Plugin for parsing and managing the Changelog in a "keep a changelog" style.
Stars: ✭ 102 (-13.56%)
Mutual labels:  gradle, gradle-plugin

clojurephant

Formerly known as "gradle-clojure"

cljdoc

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 Gradle Shadow plugin)
  • AOT compilation
  • Running clojure.test tests (integrated into Gradle's Test 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)
  • Figwheel (via figwheel.main)

Why should you care?

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

  • Strong support for polyglot projects
  • Strong support for multi-project builds
  • Large plugin ecosystem

Usage

See the Release 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 corresponding to your source code layout, and one namespace per file. The plugin uses the filenames to calculate the namespaces involved, it does not parse the files looking for ns forms.

Quick Start

Create a new Clojure library:

clj -X:new :template clojurephant-clj-lib :name myname/mylib

Create a new Clojure application:

clj -X:new :template clojurephant-clj-app :name myname/myapp

Create a new ClojureScript appliation:

clj -X:new :template clojurephant-cljs-app :name myname/myapp

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.10.1'
  // and any other dependencies you want on the compile classpath
  // implementation 'group:artifact:version'

  // needed for test integration
  testRuntimeOnly 'org.ajoberstar:jovial:0.3.0'
  // and any other test-specific dependencies
  // testImplementation 'group:artifact:version'

  // dependencies for REPL use only
  devImplementation 'org.clojure:tools.namespace:1.1.0'
}

// needed for test integration
tasks.withType(Test) {
  useJUnitPlatform()
}

See all available options in the docs.

Getting help

Read the online Clojurephant documentation https://clojurephant.dev.

For questions or support, please visit the Clojurephant Discussions, ClojureVerse gradle-clojure channel or the Clojurian's Slack #gradle channel

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

Contributing

See the guidelines for details on how you can contribute.

Acknowledgements

This project started from the cursive.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 all our contributors.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].