-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.clj
More file actions
26 lines (22 loc) · 807 Bytes
/
Copy pathbuild.clj
File metadata and controls
26 lines (22 loc) · 807 Bytes
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
(ns build
(:require [clojure.tools.build.api :as b]))
(def app 'app/laliga-fantasy-tool)
(def class-dir "target/classes")
(def uber-file (format "target/%s.jar" (name app)))
;; delay to defer side effects (artifact downloads)
(def basis (delay (b/create-basis {:project "deps.edn"})))
(defn clean [_]
(b/delete {:path "target"}))
(defn uberjar [_]
(clean nil)
(b/copy-dir {:src-dirs ["src" "resources"]
:target-dir class-dir})
(println "Compiling...")
(b/compile-clj {:basis @basis
:ns-compile '[laliga-fantasy.main]
:class-dir class-dir})
(println "Building uberjar" (str uber-file "..."))
(b/uber {:class-dir class-dir
:uber-file uber-file
:basis @basis
:main 'laliga-fantasy.main}))