This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
bb.edn
56 lines (48 loc) · 2.28 KB
/
bb.edn
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
48
49
50
51
52
53
54
55
56
{:tasks
{:requires ([babashka.fs :as fs]
[clojure.string :as str])
:init (def windows? (str/starts-with? (System/getProperty "os.name")
"Windows"))
clean (fs/delete-tree "target")
gen-circleci (load-file "script/generate_circleci.clj")
version (str/trim (slurp "resources/POD_VERSION"))
uberjar-name {:depends [version]
:task (str (fs/file "target"
(format "pod-babashka-etaoin-%s-standalone.jar" version)))}
uberjar {:doc "Builds uberjar"
:depends [uberjar-name]
:task (when (seq (fs/modified-since uberjar-name "src"))
(clojure "-T:build uber"))}
graalvm {:doc "Checks GRAALVM_HOME env var"
:task
(let [env (System/getenv "GRAALVM_HOME")]
(assert env "Set GRAALVM_HOME")
env)}
native-image {:doc "Builds native image"
:depends [graalvm uberjar-name uberjar]
:task (do
(shell (str (fs/file graalvm
"bin"
(if windows?
"gu.cmd"
"gu")))
"install" "native-image")
(shell (str (fs/file graalvm
"bin"
(if windows?
"native-image.cmd"
"native-image")))
"-jar" uberjar-name
"-H:Name=pod-babashka-etaoin"
"-H:+ReportExceptionStackTraces"
"--initialize-at-build-time=."
"-H:EnableURLProtocols=jar"
"--report-unsupported-elements-at-runtime"
"-H:EnableURLProtocols=http,https,jar"
"--enable-all-security-services"
"-H:ReflectionConfigurationFiles=reflection.json"
"--verbose"
"--no-fallback"
"--no-server"
"-J-Xmx3g"))}
test (clojure "-M:test")}}