(ns build (:require [clojure.tools.build.api :as b])) (def lib 'org.fudo/ois) (def version (format "0.1.%s" (b/git-count-revs nil))) (def class-dir "target/classes") (def basis (b/create-basis {:project "deps.edn"})) (def jar-file (format "target/%s-%s.jar" (name lib) version)) (def uber-file (format "target/%s-%s-uber.jar" (name lib) version)) (defn clean [_] (b/delete {:path "target"})) (defn jar [_] (b/write-pom {:class-dir class-dir :lib lib :version version :basis basis :src-dirs ["src"]}) (b/copy-dir {:src-dirs ["src" "resources"] :target-dir class-dir}) (b/jar {:class-dir class-dir :jar-file jar-file :main 'ois.core})) (defn uber [_] (clean nil) (b/copy-dir {:src-dirs ["src" "resources"] :target-dir class-dir}) (b/compile-clj {:basis basis :ns-compile '[ois.core] :class-dir class-dir}) (b/uber {:class-dir class-dir :uber-file uber-file :basis basis :main 'ois.core}))