-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.clj
38 lines (32 loc) · 1023 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
28
29
30
31
32
33
34
35
36
37
38
(ns build
(:require
[clojure.string :as string]
[clojure.tools.build.api :as b]))
(def lib 'com.github.clojure-lsp/lsp4clj)
(def jar-file (format "target/%s.jar" (name lib)))
(def current-version (string/trim (slurp "resources/LSP4CLJ_VERSION")))
(defn clean [_]
(b/delete {:path "target"}))
(defn pom [opts]
(clean opts)
(b/write-pom {:target ""
:lib lib
:version current-version
:basis (b/create-basis {:project "deps.edn"})
:src-dirs ["src"]
:resource-dirs ["resources"]
:scm {:tag (str "v" current-version)}}))
(defn jar [opts]
(pom opts)
(b/copy-dir {:src-dirs ["src"]
:target-dir "target/classes"})
(b/jar {:class-dir "target/classes"
:jar-file jar-file}))
(defn deploy-clojars [opts]
(jar opts)
((requiring-resolve 'deps-deploy.deps-deploy/deploy)
(merge {:installer :remote
:artifact jar-file
:pom-file "pom.xml"}
opts))
opts)