-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.clj
33 lines (28 loc) · 1.06 KB
/
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
(ns build
(:require [clojure.tools.deps.cli.api :as c]
[clojure.tools.build.api :as b]
[script.env-profiles :as p]))
(defn prep-deps [& _]
(let [profiles (p/profiles)]
(println "Preparing transitive dependencies with profiles" profiles)
(c/prep {:project "deps.edn"
:aliases profiles
:force true})))
(def class-dir "target/classes")
(defn clean [_]
(b/delete {:path "target"}))
(defn uberjar [args]
(let [profiles (p/profiles)
basis (b/create-basis {:project "deps.edn"
:aliases profiles})]
(println "Building uberjar with profiles" profiles)
(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 "target/lmgrep.jar"
:basis basis
:main 'lmgrep.core
:conflict-handlers {}})))