diff --git a/build.clj b/build.clj new file mode 100644 index 0000000..374b7b4 --- /dev/null +++ b/build.clj @@ -0,0 +1,25 @@ +(ns build + (:require + [clojure.java.io :as io] + [clojure.string :as str] + [clojure.tools.build.api :as b])) + +(def lib 'raven-clj/raven-clj) +(def version (str/trim (slurp (io/file "resources/raven_clj/version.txt")))) +(def class-dir "target/classes") +(def basis (b/create-basis {:project "deps.edn"})) +(def jar-file (format "target/%s-%s.jar" (name lib) version)) + +(defn clean [_] + (b/delete {:path "target"})) + +(defn jar [_] + (b/write-pom {:class-dir class-dir + :lib lib + :version version + :basis basis + :src-dirs ["src"]}) + (b/copy-dir {:src-dirs ["src" "resources"] + :target-dir class-dir}) + (b/jar {:class-dir class-dir + :jar-file jar-file})) diff --git a/deps.edn b/deps.edn new file mode 100644 index 0000000..c4758e7 --- /dev/null +++ b/deps.edn @@ -0,0 +1,18 @@ +{:paths + ["src" "resources"] + + :deps + {org.clojure/clojure {:mvn/version "1.11.1"} + cheshire/cheshire {:mvn/version "5.11.0"} + org.clj-commons/clj-http-lite {:mvn/version "1.0.13"} + prone/prone {:mvn/version "2021-04-23"}} + + :aliases + {;; Run with clj -T:build function-in-build + :build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.5"}} + :ns-default build} + :test {:extra-paths ["test"] + :extra-deps {lambdaisland/kaocha {:mvn/version "1.87.1366"} + lambdaisland/kaocha-cloverage {:mvn/version "1.1.89"} + lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"}} + :main-opts ["-m" "kaocha.runner"]}}} diff --git a/project.clj b/project.clj deleted file mode 100644 index 4795b55..0000000 --- a/project.clj +++ /dev/null @@ -1,19 +0,0 @@ -(defn- get-version - ;; See README for notes on why. - "Grab the version for the project." - [] - (require '[clojure.string :as str] - '[clojure.java.io :as io]) - ;; since it is so early in the boot process, it - ;; has to be io/file, and not io/resource - (str/trim (slurp (io/file "resources/raven_clj/version.txt")))) - -(defproject raven-clj (get-version) - :description "Sentry clojure client" - :url "http://github.com/sethtrain/raven-clj" - :license {:name "Eclipse Public License" - :url "http://www.eclipse.org/legal/epl-v10.html"} - :dependencies [[org.clojure/clojure "1.11.1" :scope "provided"] - [cheshire "5.11.0"] - [org.clj-commons/clj-http-lite "1.0.13"] - [prone "2021-04-23"]]) diff --git a/resources/raven_clj/version.txt b/resources/raven_clj/version.txt index bd8bf88..1d16151 100644 --- a/resources/raven_clj/version.txt +++ b/resources/raven_clj/version.txt @@ -1 +1 @@ -1.7.0 +1.8.0-alpha diff --git a/tests.edn b/tests.edn new file mode 100644 index 0000000..b1a48be --- /dev/null +++ b/tests.edn @@ -0,0 +1,2 @@ +#kaocha/v1 +{}