-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.clj
More file actions
25 lines (22 loc) · 709 Bytes
/
build.clj
File metadata and controls
25 lines (22 loc) · 709 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
(ns build
(:refer-clojure :exclude [test])
(:require [clojure.tools.build.api :as b]))
(def main 'example.lambda)
(def class-dir "target/classes")
(defn- uber-opts [opts]
(assoc opts
:main main
:uber-file "target/standalone.jar"
:basis (b/create-basis {})
:class-dir class-dir
:src-dirs ["src"]
:ns-compile [main]))
(defn uber "Build an uberjar" [opts]
(b/delete {:path "target"})
(let [opts (uber-opts opts)]
(println "\nCopying source...")
(b/copy-dir {:src-dirs ["resources" "src"] :target-dir class-dir})
(println (str "\nCompiling " main "..."))
(b/compile-clj opts)
(println "\nBuilding JAR...")
(b/uber opts)))