From eacd2d42a114655b62607f2782103d464a60930c Mon Sep 17 00:00:00 2001 From: Frankie Sardo Date: Tue, 31 May 2016 14:41:56 +0100 Subject: [PATCH] Make boot work --- build.boot | 2 +- .../auto_parcel/AutoParcelExtension.java | 0 src/{clojure => }/auto_parcel/extension.clj | 26 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) rename src/{java => }/auto_parcel/AutoParcelExtension.java (100%) rename src/{clojure => }/auto_parcel/extension.clj (67%) diff --git a/build.boot b/build.boot index cdf27f9..805ea6c 100644 --- a/build.boot +++ b/build.boot @@ -1,5 +1,5 @@ (set-env! - :resource-paths #{"src/java" "src/clojure"} + :resource-paths #{"src"} :dependencies '[[org.clojure/clojure "1.7.0"] [com.google.auto.value/auto-value "1.2-rc1"] diff --git a/src/java/auto_parcel/AutoParcelExtension.java b/src/auto_parcel/AutoParcelExtension.java similarity index 100% rename from src/java/auto_parcel/AutoParcelExtension.java rename to src/auto_parcel/AutoParcelExtension.java diff --git a/src/clojure/auto_parcel/extension.clj b/src/auto_parcel/extension.clj similarity index 67% rename from src/clojure/auto_parcel/extension.clj rename to src/auto_parcel/extension.clj index 07f3590..5fc5653 100644 --- a/src/clojure/auto_parcel/extension.clj +++ b/src/auto_parcel/extension.clj @@ -1,5 +1,5 @@ (ns auto-parcel.extension - (:require [stencil.core :as mustache])) + (:require [stencil.core :as mustache])) (def template "package {{& package}}; @@ -58,21 +58,21 @@ final class {{& class-name}} extends {{& class-to-extend}} { }") (defn- ->prop [[k v :as prop]] - {:name k - :cast-type (.toString (.getReturnType v))}) + {:name k + :cast-type (.toString (.getReturnType v))}) (defn- add-last? [props] - (cond-> props - (not-empty props) (assoc-in [(dec (count props)) :last?] true))) + (cond-> props + (not-empty props) (assoc-in [(dec (count props)) :last?] true))) (defn- generate [skeleton] - (mustache/render-string template skeleton)) + (mustache/render-string template skeleton)) (defn process [context class-name class-to-extend final?] - (let [skeleton {:package (.packageName context) - :class-name class-name - :class-to-extend class-to-extend - :props (->> (.properties context) - (mapv ->prop) - (add-last?))}] - (generate skeleton))) + (let [skeleton {:package (.packageName context) + :class-name class-name + :class-to-extend class-to-extend + :props (->> (.properties context) + (mapv ->prop) + (add-last?))}] + (generate skeleton)))