aboutsummaryrefslogtreecommitdiff
path: root/build.clj
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-04-20 23:26:33 +0200
committerTim <contact@bytim.eu>2025-04-20 23:26:33 +0200
commitb13e679aa5370d1e27cf7037e0f0a325bdf018cc (patch)
tree9500db409987bc84ce7a2659bb7a341ca451d24b /build.clj
downloadpics-b13e679aa5370d1e27cf7037e0f0a325bdf018cc.tar.xz
pics-b13e679aa5370d1e27cf7037e0f0a325bdf018cc.zip
Initial commit
Diffstat (limited to 'build.clj')
-rw-r--r--build.clj30
1 files changed, 30 insertions, 0 deletions
diff --git a/build.clj b/build.clj
new file mode 100644
index 0000000..298dbd0
--- /dev/null
+++ b/build.clj
@@ -0,0 +1,30 @@
+(ns build
+ (:require [clojure.tools.build.api :as b]
+ [clojure.edn :as edn]))
+
+(def project (-> (edn/read-string (slurp "deps.edn"))
+ :aliases :neil :project))
+
+(def class-dir "target/classes")
+(def basis (b/create-basis {:project "deps.edn"}))
+
+(def lib (:name project))
+(def version (:version project))
+
+(def uber-file (format "target/%s-standalone.jar" (name lib)))
+(def jar-file (format "target/%s.jar" (name lib)))
+
+(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 'pics.core}))