forked from jonase/eastwood
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eastwood.clj
20 lines (18 loc) · 969 Bytes
/
eastwood.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
(ns leiningen.eastwood
(:use [leinjacker.eval-in-project :only [eval-in-project]]
[leinjacker.deps :only [add-if-missing]]))
(defn eastwood
([project] (eastwood project "{}"))
([project opts]
(let [opts (read-string opts)
opts (assoc opts :source-paths (or (:source-paths opts)
(:source-paths project)
[(:source-path project)]))
opts (assoc opts :java-source-paths (or (:java-source-paths opts)
(:java-source-paths project)
[(:java-source-path project)]))
global-opts (:eastwood project)
opts (merge global-opts opts)]
(eval-in-project (add-if-missing project '[jonase/eastwood "0.0.3"])
`(eastwood.core/run-eastwood '~opts)
'(require 'eastwood.core)))))