-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.clj
27 lines (21 loc) · 803 Bytes
/
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
(ns build
(:require [clojure.tools.build.api :as b]))
(def build-directory "target")
(def jar-content (str build-directory "/resources"))
(def basis (b/create-basis {:project "deps.edn"}))
(def version "1.0.1")
(def app-name "mail-harvester")
(def uber-file-name (format "%s/%s-%s-standalone.jar" build-directory app-name version))
(defn clean [_]
(b/delete {:path build-directory})
(println (format "Build directory \"%s\" removed" build-directory)))
(defn uber [_]
(clean nil)
(b/compile-clj {:basis basis
:src-dirs ["src"]
:class-dir jar-content})
(b/uber {:class-dir jar-content
:uber-file uber-file-name
:basis basis
:main 'mail-harvester.core})
(println (format "Uber file created: \"%s\"" uber-file-name)))