-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.clj
39 lines (30 loc) · 1.1 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
34
35
36
37
38
39
;; see https://ask.clojure.org/index.php/10905/control-transient-deps-that-compiled-assembled-into-uberjar?show=10913#c10913
(require 'clojure.tools.deps.alpha.util.s3-transporter)
(ns build
(:refer-clojure :exclude [compile])
(:require #_[babashka.fs :as fs]
[clojure.tools.build.api :as b]))
(def lib 'net.b12n.viip/viip)
(def class-dir "target/classes")
(def uber-file "target/viip.jar")
(def src-dirs ["src" "resources"])
(def basis (b/create-basis))
(defn uber [_]
(println "Writing pom")
(b/write-pom {:class-dir class-dir
:lib lib
:version "1.0.0"
:basis basis
:src-dirs ["src" "resources"]})
(b/copy-dir {:src-dirs src-dirs
:target-dir class-dir})
(println "Compile sources to classes")
(b/compile-clj {:basis basis
:src-dirs src-dirs
:class-dir class-dir
:ns-compile '[net.b12n.viip.core]})
(println "Building uberjar")
(b/uber {:class-dir class-dir
:uber-file uber-file
:basis basis
:main 'net.b12n.viip.core}))