-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.clj
47 lines (44 loc) · 1.46 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
40
41
42
43
44
45
46
47
(ns build
(:require
[clojure.tools.build.api :as b])
(:import
[java.time LocalDate]))
(def lib 'samply/blaze)
(def version "0.30.2")
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version))
(defn clean [_]
(b/delete {:path "target"}))
(defn uber [_]
(clean nil)
(b/copy-dir {:src-dirs ["src" "resources"]
:target-dir class-dir})
(b/write-file {:path (str class-dir "/blaze/version.edn")
:content {:blaze/version version
:blaze/release-date (str (LocalDate/now))}})
(b/compile-clj {:basis basis
:src-dirs ["src"]
:class-dir class-dir
:compile-opts
{:direct-linking true
:elide-meta [:doc :file :line :added]}})
(b/uber {:class-dir class-dir
:uber-file uber-file
:basis basis
:main 'blaze.core
:exclude
["^about.html"
"^META-INF/versions/\\d+/module-info.class"
"^HISTORY-JAVA.md"
"^dse_protocol_v\\d.spec"
"^native_protocol_v\\d.spec"
".*-musl.so$"
".*-ppc64le.so$"
".*-s390x.so$"
".*-linux32.so$"
".*.dll$"
".*.jnilib$"]
:conflict-handlers
{"META-INF/io.netty.versions.properties" :append
:default :warn}}))