-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.clj
40 lines (33 loc) · 1.29 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
32
33
34
35
36
37
38
39
40
(ns build
(:require
[clojure.string :as str]
[clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as deps-deploy]))
(def basis (delay (b/create-basis {})))
(def lib 'com.kepler16/ok-http)
(def version (str/replace (or (System/getenv "VERSION") "0.0.0") #"v" ""))
(def class-dir "target/classes")
(def jar-file "target/lib.jar")
(defn clean [_]
(b/delete {:path "target"}))
(defn jar [_]
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis @basis
:src-dirs ["src"]
:pom-data [[:description "Clojure wrapper for https://github.com/square/okhttp"]
[:url "https://github.com/kepler16/ok-http"]
[:licenses
[:license
[:name "MIT"]
[:url "https://opensource.org/license/mit"]]]]})
(b/copy-dir {:src-dirs ["src"]
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file}))
(defn release [_]
(deps-deploy/deploy {:installer :remote
:artifact (b/resolve-path jar-file)
:pom-file (b/pom-path {:lib lib
:class-dir class-dir})}))