diff --git a/build.clj b/build.clj index 9093f46..b36598c 100644 --- a/build.clj +++ b/build.clj @@ -3,15 +3,32 @@ (:require [clojure.tools.build.api :as b] [org.corfield.build :as cb])) -(defn project +(defn project "apply project default to `opts`" [opts] - (let [defaults {:lib 'sg.flybot/lasagna-pull - :version (format "0.4.%s" (b/git-count-revs nil)) - :scm {:url "https://github.com/flybot-sg/lasagna-pull"}}] + (let [version (format "0.4.%s" (b/git-count-revs nil)) + defaults {:lib 'sg.flybot/lasagna-pull + :version version}] (merge defaults opts))) -(defn tests +(defn pom + [opts] + (let [pom-data + [[:description "Precisely select from deep data structure"] + [:url "https://github.com/flybot-sg/lasagna-pull"] + [:licenses + [:license + [:name "Apache-2.0"] + [:url "https://www.apache.org/licenses/LICENSE-2.0.txt"]]] + [:organization "Flybot Pte Ltd"]] + opts (merge opts + {:basis (b/create-basis {}) + :target "target" + :pom-data pom-data})] + (b/write-pom opts) + opts)) + +(defn tests "run all tests, for clj and cljs." [opts] (-> opts @@ -24,6 +41,7 @@ (project) (cb/clean) (tests) + (pom) (cb/jar))) (defn deploy diff --git a/deps.edn b/deps.edn index f5b2d22..6aff8d8 100644 --- a/deps.edn +++ b/deps.edn @@ -32,5 +32,6 @@ :build ;build {:deps - {io.github.seancorfield/build-clj {:git/tag "v0.9.2", :git/sha "9c9f078"}}, + {io.github.clojure/tools.build {:mvn/version "0.10.8"} + io.github.seancorfield/build-clj {:git/tag "v0.9.2", :git/sha "9c9f078"}}, :ns-default build}}}