This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
forked from healthfinch/depstar
-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
depstar.clj
60 lines (53 loc) · 1.72 KB
/
depstar.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
;; copyright (c) 2020-2021 sean corfield, all rights reserved
(ns hf.depstar
"Entry point for clojure -X options."
(:require [hf.depstar.uberjar :as uber]))
(defn jar
"Generic entry point for jar invocations.
Can be used with `clojure -X`:
In `:aliases`:
```clojure
:jar {:replace-deps {seancorfield/depstar {:mvn/version ...}}
:exec-fn hf.depstar/jar
:exec-args {}}
```
Then run:
```
clojure -X:jar :jar MyProject.jar
```
If the destination JAR file is fixed, it could be added to `:exec-args` in
`deps.edn`:
```clojure
:jar {:replace-deps {seancorfield/depstar {:mvn/version ...}}
:exec-fn hf.depstar/jar
:exec-args {:jar MyProject.jar}}
```
`:jar` can be specified as a symbol or a string."
[options]
(uber/build-jar-as-main (merge {:jar-type :thin} options)))
(defn uberjar
"Generic entry point for uberjar invocations.
Can be used with `clojure -X`:
In `:aliases`:
```clojure
:uberjar {:replace-deps {seancorfield/depstar {:mvn/version ...}}
:exec-fn hf.depstar/uberjar
:exec-args {}}
```
Then run:
```
clojure -X:uberjar :aot true :jar MyProject.jar :main-class project.core
```
If any of the destination JAR file, main class, and/or AOT setting are fixed,
they could be added to `:exec-args` in
`deps.edn`:
```clojure
:uberjar {:replace-deps {seancorfield/depstar {:mvn/version ...}}
:exec-fn hf.depstar/uberjar
:exec-args {:aot true
:jar MyProject.jar
:main-class project.core}}
```
`:jar` can be specified as a symbol or a string."
[options]
(uber/build-jar-as-main (merge {:jar-type :uber} options)))