-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.clj
34 lines (32 loc) · 1004 Bytes
/
build.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(ns build
(:require
[clojure.string :as str]
[clojure.tools.build.api :as b]))
(def lib 'io.lazy-cat/xdeps)
(def version (-> "version" (slurp) (str/trim-newline)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file "target/xdeps.jar")
(def src-dirs ["src/main/clojure" "src/main/resources"])
(def main 'xdeps.main)
(defn uberjar
[_]
(println "Writing pom.xml...")
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis basis
:src-dirs src-dirs})
(println "Copying sources...")
(b/copy-dir {:src-dirs src-dirs
:target-dir class-dir})
(println "Compiling sources...")
(b/compile-clj {:basis basis
:src-dirs src-dirs
:class-dir class-dir})
(println "Building uberjar...")
(b/uber {:class-dir class-dir
:uber-file jar-file
:basis basis
:main main})
(println "Done..."))