-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.boot
139 lines (115 loc) · 2.98 KB
/
build.boot
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
(def artifact
{:project
'cljdbc/cljdbc
:version
"0.0.1-SNAPSHOT"
:description
"A yesql, funcool/java.jdbc and clojure.java.jdbc inspired sql query facility."
:url
"https://github.org/instilled/cljdbc"
:scm
{:name "git"
:url "[email protected]:instilled/cljdbc.git"}
:license
{"Eclipse Public License - v 1.0" "https://www.eclipse.org/legal/epl-v10.html"}})
(set-env!
:dependencies
'[;; provided
[com.zaxxer/HikariCP "2.4.5"
:scope "provided"]
[org.apache.tomcat/tomcat-jdbc "8.5.5"
:score "provided"]
[org.clojure/clojure "1.8.0"
:scope "provided"]
[org.slf4j/slf4j-api "1.7.21"
:scope "provided"]
[org.apache.logging.log4j/log4j-slf4j-impl "2.6.2"
:scope "provided"]
[org.apache.logging.log4j/log4j-core "2.6.2"
:scope "provided"]
[org.apache.logging.log4j/log4j-api "2.6.2"
:scope "provided"]
;; test dependencies
[org.clojure/java.jdbc "0.5.8"
:scope "test"]
[adzerk/boot-test "1.1.1"
:scope "test"]]
:source-paths
#{"src/main/clojure"}
;;:resource-paths
;;#{"src/main/resources"}
:target-path
"target"
;;:deploy-repos {}
)
(require '[adzerk.boot-test :refer :all])
(task-options!
pom artifact
test {:filters #{'(not (-> % meta :integration))}}
jar {:file (str "cljdbc-" (:version artifact) ".jar")})
(deftask test1
"Add test sources and resources to the classpath."
[]
(merge-env!
:source-paths
#{"src/test/clojure"}
:resource-paths
#{"src/test/resources"})
identity)
(deftask mysql
"Add mysql to the classpath."
[]
(set-env!
:dependencies
#(conj % '[mysql/mysql-connector-java "5.1.39" :scope "test"]))
(task-options!
test {:filters #{'(-> % meta :mysql)}}))
(deftask oracle
"Add oracle to the classpath."
[]
(set-env!
:dependencies
#(conj % '[org.oracle/ojdbc7 "12.1.0.2" :scope "test"]))
(task-options!
test {:filters #{'(-> % meta :oracle)}}))
(deftask postgres
"Add postgres to the classpath."
[]
(set-env!
:dependencies
#(conj % '[org.postgresql/postgresql "9.4.1210.jre7" :scope "test"]))
(task-options!
test {:filters #{'(-> % meta :postgres)}}))
(deftask h2
"Add h2 to the classpath."
[]
(set-env!
:dependencies
#(conj % '[com.h2database/h2 "1.4.192"]))
(task-options!
test {:filters #{'(-> % meta :h2)}}))
(deftask remove-ignored
[]
(sift
:invert true
:include #{#".*\.swp" #".gitkeep"}))
(deftask build
"Build the shizzle."
[]
(merge-env!
:resource-paths
#{"src/main/clojure"})
(comp
(remove-ignored)
(pom)
(jar)
(target)
(install)))
(deftask deploy
[]
(push
:gpg-sign false
:repo "clojars"))
(replace-task!
[t test] (fn [& xs] (comp (test1) (apply t xs)))
[r repl] (fn [& xs] (comp (test1) (apply r xs))))