-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.clj
31 lines (28 loc) · 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
(ns build
(:require [clojure.tools.build.api :as b]
[clojure.string :as str]
[clojure.java.io :as io]))
(def class-dir "target/classes")
(defn clean [_]
(b/delete {:path "target"}))
(defn jar [_]
(clean nil)
(let [lib 'com.github.flow-storm/hansel
version (format "0.1.%s" (b/git-count-revs nil))
basis (b/create-basis {:project "deps.edn"
:aliases []})
jar-file (format "target/%s.jar" (name lib))
src-dirs ["src"]]
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis basis
:src-dirs src-dirs
:pom-data [[:licenses
[:license
[:name "Unlicense"]
[:url "http://unlicense.org/"]]]]})
(b/copy-dir {:src-dirs src-dirs
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file})))