-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.clj
29 lines (25 loc) · 1.17 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
(ns build
(:require [clojure.tools.build.api :as b]))
(def version "1.1.0")
(def lib 'io.github.luciolucio/holi)
(def basis (b/create-basis {:project "deps.edn"}))
(defn clean [_]
(b/delete {:path "target"})
(b/delete {:path "resources/calendars-generated"}))
(defn jar [{:keys [build-root jar-file]}]
(let [class-dir (str build-root "/" "classes")]
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis basis
:scm {:url "https://github.com/luciolucio/holi"
:connection "scm:git:git://github.com/luciolucio/holi.git"
:developerConnection "scm:git:ssh://[email protected]/luciolucio/holi.git"
:tag version}
:src-dirs ["src"]})
(b/copy-dir {:src-dirs ["src"]
:target-dir class-dir})
(b/copy-dir {:src-dirs ["resources/calendars-generated"]
:target-dir (str class-dir "/" "calendars-generated")})
(b/jar {:class-dir class-dir
:jar-file (str build-root "/" jar-file)})))