From 5314290bbec53379372d14234fdc4f28cbe3286a Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 31 Dec 2024 16:23:46 +0100 Subject: Initial commit --- build.clj | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 build.clj (limited to 'build.clj') 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})) -- cgit v1.2.3