|
1 | | -{:paths ["src/main" "src/bb"] |
| 1 | +{:paths ["src/bb" |
| 2 | + "sdk/src/main" |
| 3 | + "sdk-adapter-http-kit/src/main/" |
| 4 | + "sdk-malli-schemas/src/main" |
| 5 | + "./src/test/core-sdk" |
| 6 | + "./src/test/malli-schemas"] |
| 7 | + |
| 8 | + :deps {io.github.noahtheduke/lazytest {:mvn/version "1.8.0"} |
| 9 | + metosin/malli {:mvn/version "0.17.0"}} |
| 10 | + |
2 | 11 | :tasks |
3 | 12 | {:requires ([tasks :as t]) |
4 | 13 |
|
5 | | - -prep (t/prep-libs) |
6 | | - |
7 | | - dev {:task (t/dev :http-kit :ring-jetty :malli-schemas)} |
8 | | - |
9 | | - dev:rj9a {:task (t/dev :http-kit :ring-rj9a :malli-schemas)} |
10 | | - |
11 | | - dev:empty (t/dev :malli-schemas) |
12 | | - |
13 | | - test:all (t/lazytest [:http-kit |
14 | | - :ring-jetty |
15 | | - :malli-schemas |
16 | | - :sdk-brotli] |
17 | | - [:test.paths/core-sdk |
18 | | - :test.paths/malli-schemas |
19 | | - :test.paths/brotli |
20 | | - :test.paths/adapter-ring |
21 | | - :test.paths/adapter-http-kit |
22 | | - :test.paths/adapter-ring-jetty]) |
23 | | - |
24 | | - test:all-w (t/lazytest [:http-kit |
25 | | - :ring-jetty |
26 | | - :malli-schemas |
27 | | - :sdk-brotli] |
28 | | - [:test.paths/core-sdk |
29 | | - :test.paths/malli-schemas |
30 | | - :test.paths/brotli |
31 | | - :test.paths/adapter-ring |
32 | | - :test.paths/adapter-ring-jetty |
33 | | - :test.paths/adapter-http-kit] |
34 | | - "--watch" |
35 | | - "--delay 1000") |
36 | | - |
37 | | - test:rj9a (t/lazytest [:http-kit |
38 | | - :ring-rj9a] |
39 | | - [:test.paths/core-sdk |
40 | | - :test.paths/adapter-ring |
41 | | - :test.paths/adapter-rj9a]) |
42 | | - |
43 | | - jar:sdk {:doc "Build jar for the common sdk" |
44 | | - :task (t/lib-jar! t/sdk-dir)} |
45 | | - |
46 | | - jar:sdk-adapter-ring {:doc "Build jar for the adapter-ring" |
47 | | - :task (t/lib-jar! t/sdk-adapter-ring-dir)} |
48 | | - |
49 | | - jar:sdk-adapter-http-kit {:doc "Build jar for the adapter-http-kit" |
50 | | - :task (t/lib-jar! t/sdk-adapter-http-kit-dir)} |
51 | | - |
52 | | - jar:sdk-brotli {:doc "Build jar for the Brotli library" |
53 | | - :task (t/lib-jar! t/sdk-brotli-dir)} |
54 | | - |
55 | | - jar:sdk-malli-schemas {:doc "Build jar for the malli-schemas" |
56 | | - :task (t/lib-jar! t/sdk-malli-schemas-dir)} |
57 | | - |
58 | | - jar:all {:doc "Build the jar for all the libs" |
59 | | - :depends [clean |
60 | | - jar:sdk |
61 | | - jar:sdk-adapter-ring |
62 | | - jar:sdk-adapter-http-kit |
63 | | - jar:sdk-brotli |
64 | | - jar:sdk-malli-schemas]} |
65 | | - |
66 | | - install:all {:doc "Install all libraries" |
67 | | - :depends [clean] |
68 | | - :task (doseq [dir t/sdk-lib-dirs] |
69 | | - (t/lib-install! dir))} |
70 | | - |
71 | | - clean {:doc "Clean build artifacts" |
72 | | - :task (doseq [dir t/sdk-lib-dirs] |
73 | | - (clojure {:dir dir} "-T:build clean"))} |
74 | | - |
75 | | - set-version {:doc "Set the version in all libs" |
76 | | - :task (doseq [dir t/sdk-lib-dirs] |
77 | | - (t/lib-set-version! dir (first *command-line-args*)))} |
78 | | - |
79 | | - bump-version {:doc "Bump the version component in all libs. First argument must be one of: major, minor, patch" |
80 | | - :task (doseq [dir sdk-lib-dirs] |
81 | | - (let [component (first *command-line-args*)] |
82 | | - (t/lib-bump! dir component)))} |
83 | | - |
84 | | - publish:all {:doc "Publish the clojure sdk libs to clojars" |
85 | | - :depends [jar:all] |
86 | | - :task (doseq [dir sdk-lib-dirs] |
87 | | - (t/lib-publish! dir))}}} |
| 14 | + dev |
| 15 | + {:doc "Starts a dev repl. Additional deps aliases can be passed as arguments." |
| 16 | + :task (t/dev :http-kit :ring-jetty :malli-schemas)} |
| 17 | + |
| 18 | + dev:rj9a |
| 19 | + {:doc "Same as `dev` with ring-jetty replaced with rj9a." |
| 20 | + :task (t/dev :http-kit :ring-rj9a :malli-schemas)} |
| 21 | + |
| 22 | + dev:empty |
| 23 | + {:doc "Dev repl with no adapters." |
| 24 | + :task (t/dev :malli-schemas)} |
| 25 | + |
| 26 | + dev:bb |
| 27 | + {:doc "Start a babashka nrepl server. An addr like `localhost:1234` can be passed as argument." |
| 28 | + :task (t/dev-bb)} |
| 29 | + |
| 30 | + test:all |
| 31 | + {:doc "Run all tests once." |
| 32 | + :task (t/lazytest [:http-kit |
| 33 | + :ring-jetty |
| 34 | + :malli-schemas |
| 35 | + :sdk-brotli] |
| 36 | + [:test.paths/core-sdk |
| 37 | + :test.paths/malli-schemas |
| 38 | + :test.paths/brotli |
| 39 | + :test.paths/adapter-ring |
| 40 | + :test.paths/adapter-http-kit |
| 41 | + :test.paths/adapter-ring-jetty])} |
| 42 | + |
| 43 | + test:all-w |
| 44 | + {:doc "Watch all tests." |
| 45 | + :task (t/lazytest [:http-kit |
| 46 | + :ring-jetty |
| 47 | + :malli-schemas |
| 48 | + :sdk-brotli] |
| 49 | + [:test.paths/core-sdk |
| 50 | + :test.paths/malli-schemas |
| 51 | + :test.paths/brotli |
| 52 | + :test.paths/adapter-ring |
| 53 | + :test.paths/adapter-ring-jetty |
| 54 | + :test.paths/adapter-http-kit] |
| 55 | + "--watch" |
| 56 | + "--delay 1000")} |
| 57 | + |
| 58 | + test:rj9a |
| 59 | + {:doc "Same as `test:all` with ring-jetty replaced by rj9a." |
| 60 | + :task (t/lazytest [:http-kit |
| 61 | + :ring-rj9a] |
| 62 | + [:test.paths/core-sdk |
| 63 | + :test.paths/adapter-ring |
| 64 | + :test.paths/adapter-rj9a])} |
| 65 | + |
| 66 | + test:bb |
| 67 | + {:doc "Run core unit tests with babashka." |
| 68 | + :task (t/bb-lazytest [:test.paths/core-sdk |
| 69 | + :test.paths/malli-schemas])} |
| 70 | + |
| 71 | + jar:sdk |
| 72 | + {:doc "Build jar for the common sdk" |
| 73 | + :task (t/lib-jar! t/sdk-dir)} |
| 74 | + |
| 75 | + jar:sdk-adapter-ring |
| 76 | + {:doc "Build jar for the adapter-ring" |
| 77 | + :task (t/lib-jar! t/sdk-adapter-ring-dir)} |
| 78 | + |
| 79 | + jar:sdk-adapter-http-kit |
| 80 | + {:doc "Build jar for the adapter-http-kit" |
| 81 | + :task (t/lib-jar! t/sdk-adapter-http-kit-dir)} |
| 82 | + |
| 83 | + jar:sdk-brotli |
| 84 | + {:doc "Build jar for the Brotli library" |
| 85 | + :task (t/lib-jar! t/sdk-brotli-dir)} |
| 86 | + |
| 87 | + jar:sdk-malli-schemas |
| 88 | + {:doc "Build jar for the malli-schemas" |
| 89 | + :task (t/lib-jar! t/sdk-malli-schemas-dir)} |
| 90 | + |
| 91 | + jar:all |
| 92 | + {:doc "Build the jar for all the libs" |
| 93 | + :depends [clean |
| 94 | + jar:sdk |
| 95 | + jar:sdk-adapter-ring |
| 96 | + jar:sdk-adapter-http-kit |
| 97 | + jar:sdk-brotli |
| 98 | + jar:sdk-malli-schemas]} |
| 99 | + |
| 100 | + install:all |
| 101 | + {:doc "Install all libraries" |
| 102 | + :depends [clean] |
| 103 | + :task (doseq [dir t/sdk-lib-dirs] |
| 104 | + (t/lib-install! dir))} |
| 105 | + |
| 106 | + clean |
| 107 | + {:doc "Clean build artifacts" |
| 108 | + :task (doseq [dir t/sdk-lib-dirs] |
| 109 | + (clojure {:dir dir} "-T:build clean"))} |
| 110 | + |
| 111 | + set-version |
| 112 | + {:doc "Set the version in all libs" |
| 113 | + :task (doseq [dir t/sdk-lib-dirs] |
| 114 | + (t/lib-set-version! dir (first *command-line-args*)))} |
| 115 | + |
| 116 | + bump-version |
| 117 | + {:doc "Bump the version component in all libs. First argument must be one of: major, minor, patch" |
| 118 | + :task (doseq [dir sdk-lib-dirs] |
| 119 | + (let [component (first *command-line-args*)] |
| 120 | + (t/lib-bump! dir component)))} |
| 121 | + |
| 122 | + publish:all |
| 123 | + {:doc "Publish the clojure sdk libs to clojars" |
| 124 | + :depends [jar:all] |
| 125 | + :task (doseq [dir sdk-lib-dirs] |
| 126 | + (t/lib-publish! dir))}}} |
0 commit comments