Commits

Meikel Brandmeyer  committed 3dafccf

Initial check-in

  • Participants

Comments (0)

Files changed (6)

+Copyright 2013 © Meikel Brandmeyer.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

File README.markdown

+# clojuresque – a Clojure plugin for Gradle
+
+## What is Gradle?
+
+[Gradle][] is a build system written in Java and [Groovy][]. One advantage
+of [Gradle][] is, that the build script itself is also a [Groovy][] script.
+That means whatever can be done in [Groovy][] can be done in the build
+script. This is useful to abstract away common patterns in the build like
+repetition or conditional decisions.
+
+On top of that [Gradle][] provides a convenient build system which comes
+in form of different plugins. Each plugin defines certain conventions which
+(if followed) automasie 95% of the build completely. Still the conventions
+are freely configurable to be adapted to different project structures.
+
+## What is clojuresque?
+
+[clojuresque][cg] is now a plugin for [Gradle][], which adds [Clojure][clj]
+support. It allows compilation with automatic namespace recognition. The
+plugin is based on the Java plugin and hooks into the standard configurations
+and archives.
+
+## Usage
+
+Create a `build.gradle` script in the root directory of your project. *Note
+that gradle derives the project name from the name of this directory!*
+
+    buildscript {
+        repositories {
+            maven { url 'http://clojars.org/repo' }
+        }
+        dependencies {
+            classpath 'clojuresque:clojuresque:1.0.0'
+        }
+    }
+    
+    apply plugin: 'clojure'
+
+## Meta plugin
+
+This is a meta plugin applying the various parts of the clojuresque
+ecosphere.
+
+## Issues
+
+This is **alpha** software! Expect problems! Please report issues in the
+bugtracker at [bitbucket][bb]. Or email them to me.
+
+General support is available on the [clojuresque google group][cgg].
+
+-- 
+Meikel Brandmeyer <mb@kotka.de>
+Frankfurt am Main, October 2013
+
+[Gradle]: http://www.gradle.org
+[Groovy]: http://groovy.codehaus.org
+[clj]:    http://clojure.org
+[cg]:     http://bitbucket.org/clojuresque/clojuresque
+[bb]:     http://bitbucket.org/clojuresque/base/issues
+[cgg]:    https://groups.google.com/forum/#!forum/clojuresque

File build.gradle

+buildscript {
+    repositories {
+        mavenCentral()
+        maven { url "http://clojars.org/repo" }
+    }
+
+    dependencies {
+        classpath "de.kotka.gradle:gradle-plugin:1.1.0"
+    }
+}
+
+group = 'clojuresque'
+version = '1.6.0-SNAPSHOT'
+description = "A Clojure plugin for gradle"
+
+ext.kotka = [
+    repository:     "clojuresque/clojuresque",
+    wrapperVersion: "1.8"
+]
+
+apply plugin: 'kotka'
+apply plugin: 'groovy'
+
+repositories {
+    mavenCentral()
+}
+
+dependencies {
+    compile gradleApi()
+    compile localGroovy()
+
+    compile "clojuresque:clojuresque-base:1.6.0-SNAPSHOT"
+    compile "clojuresque:clojuresque-nrepl:1.0.0-SNAPSHOT"
+    compile "clojuresque:clojuresque-extras:1.0.0-SNAPSHOT"
+    compile "clojuresque:clojuresque-clojars:1.3.0"
+}
+
+compileGroovy {
+    sourceCompatibility = "1.6"
+    targetCompatibility = "1.6"
+}

File settings.gradle

+rootProject.name = 'clojuresque'

File src/main/groovy/clojuresque/ClojurePlugin.groovy

+/*-
+ * Copyright 2013 © Meikel Brandmeyer.
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+package clojuresque
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+
+class ClojurePlugin implements Plugin<Project> {
+    void apply(Project project) {
+        project.apply plugin: "clojure-base"
+        project.apply plugin: "clojure-nrepl"
+        project.apply plugin: "clojure-extras"
+        project.apply plugin: "clojars"
+    }
+}

File src/main/resources/META-INF/gradle-plugins/clojure.properties

+implementation-class=clojuresque.ClojurePlugin