aboutsummaryrefslogtreecommitdiff
path: root/build.clj
diff options
context:
space:
mode:
Diffstat (limited to 'build.clj')
-rw-r--r--build.clj29
1 files changed, 29 insertions, 0 deletions
diff --git a/build.clj b/build.clj
new file mode 100644
index 0000000..564005f
--- /dev/null
+++ b/build.clj
@@ -0,0 +1,29 @@
+(ns build
+ (:require [clojure.tools.build.api :as b]
+ [clojure.edn :as edn]))
+
+(def class-dir "target/classes")
+
+(def project (-> (edn/read-string (slurp "deps.edn"))
+ :aliases :neil :project))
+(def lib (:name project))
+(def version (:version project))
+
+(def basis (b/create-basis {:project "deps.edn"}))
+(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version))
+(def jar-file (format "target/%s-%s.jar" (name lib) version))
+
+(defn clean [_]
+ (b/delete {:path "target"}))
+
+(defn uber [_]
+ (clean nil)
+ (b/copy-dir {:src-dirs ["src" "resources"]
+ :target-dir class-dir})
+ (b/compile-clj {:basis basis
+ :src-dirs ["src"]
+ :class-dir class-dir})
+ (b/uber {:class-dir class-dir
+ :uber-file uber-file
+ :basis basis
+ :main 'dummy-auth.core}))