build.clj 641 B

12345678910111213141516171819202122232425
  1. (ns build
  2. (:require [clojure.tools.build.api :as b]))
  3. (def lib 'attendant)
  4. (def version "0.0.1")
  5. (def class-dir "target/classes")
  6. (def basis (b/create-basis {:project "deps.edn"}))
  7. (def uber-file (format "target/%s-%s-standalone.jar" (name lib) version))
  8. (defn clean [_]
  9. (b/delete {:path "target"}))
  10. (defn uber [_]
  11. (clean nil)
  12. (b/copy-dir {:src-dirs ["src"]
  13. :target-dir class-dir})
  14. (b/compile-clj {:basis basis
  15. :src-dirs ["src"]
  16. :class-dir class-dir})
  17. (b/uber {:class-dir class-dir
  18. :uber-file uber-file
  19. :basis basis
  20. :main 'attendant.main}))