diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 028dfeb..dec37dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: ['8', '17'] + java: ['8', '17', '21'] steps: - uses: actions/checkout@v4 @@ -41,4 +41,4 @@ jobs: cli: 'latest' - name: Run Tests - run: clojure -T:build run-tests + run: bin/test diff --git a/.gitignore b/.gitignore index 89267ec..c6c83ae 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ foo.clj .env .clj-kondo/.cache +tags.lock diff --git a/CHANGELOG.md b/CHANGELOG.md index ce2a27f..c8b5561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ endeavour to be non-breaking (by moving to new names rather than by breaking existing names). COMMITS is an ever-increasing counter of commits since the beginning of this repository. +## [6.33.204] + +- Update Sentry Java SDK to 6.33.0 +- Replace deprecated Sean Corfield build library with official Clojure tools.build +- Add Java 21 as a testing target on GitHub Actions +- Preserve keyword namespaces in java-util-hashmappify. Thanks @DerGuteMoritz! + ## [6.29.202] - Update Sentry Java SDK to 6.29.0 @@ -371,7 +378,8 @@ commits since the beginning of this repository. compatible with Sentry 10.0.1 and below. If you wish to use those versions, please continue to use sentry-clj 1.7.30. -[Unreleased]: https://github.com/getsentry/sentry-clj/compare/6.29.202...HEAD +[Unreleased]: https://github.com/getsentry/sentry-clj/compare/6.33.204...HEAD +[6.33.204]: https://github.com/getsentry/sentry-clj/compare/6.29.202...6.33.204 [6.29.202]: https://github.com/getsentry/sentry-clj/compare/6.28.200...6.29.202 [6.28.200]: https://github.com/getsentry/sentry-clj/compare/6.26.199...6.28.200 [6.26.199]: https://github.com/getsentry/sentry-clj/compare/6.24.198...6.26.199 diff --git a/deps.edn b/deps.edn index 9907126..3755c57 100644 --- a/deps.edn +++ b/deps.edn @@ -4,23 +4,24 @@ ;; ;; ;; - io.sentry/sentry {:mvn/version "6.29.0"} + io.sentry/sentry {:mvn/version "6.33.0"} ring/ring-core {:mvn/version "1.10.0"}} - :aliases {:build {:deps {io.github.seancorfield/build-clj {:git/tag "v0.9.2" - :git/sha "9c9f078"}} + :aliases {:build {:extra-deps {io.github.clojure/tools.build {:mvn/version "0.9.6"} + slipset/deps-deploy {:mvn/version "0.2.2"}} :ns-default scripts.build} :test {:extra-paths ["test"] - :extra-deps {cheshire/cheshire {:mvn/version "5.11.0"} - com.github.seancorfield/expectations {:mvn/version "2.0.165"} - lambdaisland/kaocha {:mvn/version "1.86.1355"} + :extra-deps {cheshire/cheshire {:mvn/version "5.12.0"} + com.github.seancorfield/expectations {:mvn/version "2.1.188"} + lambdaisland/kaocha {:mvn/version "1.87.1366"} lambdaisland/kaocha-junit-xml {:mvn/version "1.17.101"} orchestra/orchestra {:mvn/version "2021.01.01-1"} org.clojure/test.check {:mvn/version "1.1.1"}}} - :antq {:replace-deps {com.github.liquidz/antq {:mvn/version "2.6.1121"} + :antq {:replace-deps {com.github.liquidz/antq {:mvn/version "2.7.1133"} org.slf4j/slf4j-nop {:mvn/version "2.0.9"}} + :replace-paths ["."] :exec-fn antq.tool/outdated :exec-args {:skip ["pom"] :verbose true diff --git a/examples/basic/deps.edn b/examples/basic/deps.edn index 7c3b74c..ef169af 100644 --- a/examples/basic/deps.edn +++ b/examples/basic/deps.edn @@ -5,7 +5,7 @@ ;; ;; ch.qos.logback/logback-classic {:mvn/version "1.4.11"} - io.sentry/sentry {:mvn/version "6.29.0"} + io.sentry/sentry {:mvn/version "6.33.0"} io.sentry/sentry-clj {:local/root "../../../sentry-clj"} org.clojure/tools.cli {:mvn/version "1.0.219"} org.clojure/tools.logging {:mvn/version "1.2.4"} diff --git a/examples/ring_with_tracing/deps.edn b/examples/ring_with_tracing/deps.edn index 5adeb85..277c307 100644 --- a/examples/ring_with_tracing/deps.edn +++ b/examples/ring_with_tracing/deps.edn @@ -7,7 +7,7 @@ ch.qos.logback/logback-classic {:mvn/version "1.4.11"} integrant/integrant {:mvn/version "0.8.1"} integrant/repl {:mvn/version "0.3.3"} - io.sentry/sentry {:mvn/version "6.29.0"} + io.sentry/sentry {:mvn/version "6.33.0"} io.sentry/sentry-clj {:local/root "../../../sentry-clj"} org.clojure/tools.cli {:mvn/version "1.0.219"} org.clojure/tools.logging {:mvn/version "1.2.4"} diff --git a/examples/uncaught/deps.edn b/examples/uncaught/deps.edn index 7c3b74c..ef169af 100644 --- a/examples/uncaught/deps.edn +++ b/examples/uncaught/deps.edn @@ -5,7 +5,7 @@ ;; ;; ch.qos.logback/logback-classic {:mvn/version "1.4.11"} - io.sentry/sentry {:mvn/version "6.29.0"} + io.sentry/sentry {:mvn/version "6.33.0"} io.sentry/sentry-clj {:local/root "../../../sentry-clj"} org.clojure/tools.cli {:mvn/version "1.0.219"} org.clojure/tools.logging {:mvn/version "1.2.4"} diff --git a/pom.xml b/pom.xml deleted file mode 100644 index f5be7de..0000000 --- a/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - 4.0.0 - jar - io.sentry - sentry-clj - 0.0.0 - sentry-clj - A very thin wrapper around the official Java library for Sentry. - https://github.com/getsentry/sentry-clj - - - Eclipse Public License - http://www.eclipse.org/legal/epl-v10.html - - - - https://github.com/getsentry/sentry-clj - scm:git:git://github.com/getsentry/sentry-clj.git - scm:git:ssh://git@github.com/getsentry/sentry-clj.git - 0.0.0 - - - src - - - - clojars - https://repo.clojars.org/ - - - - - clojars - Clojars repository - https://clojars.org/repo - - - diff --git a/scripts/build.clj b/scripts/build.clj index d4182b7..45ffbf5 100644 --- a/scripts/build.clj +++ b/scripts/build.clj @@ -1,55 +1,70 @@ (ns scripts.build (:require [clojure.tools.build.api :as b] - [org.corfield.build :as bb])) + [deps-deploy.deps-deploy :as dd])) -(def ^:private version (format "6.29.%s" (b/git-count-revs nil))) (def ^:private library 'io.sentry/sentry-clj) -(defn run-tests - "Tests the application. +(defn ^:private the-version + [patch] + (format "6.33.%s" patch)) - This task will compile and test the application. - " - [opts] - (-> (merge {:main-args ["-m" "kaocha.runner"]} opts) - (bb/run-tests))) +(defn ^:private pom-template + [tag] + [[:description "A very thin wrapper around the official Java library for Sentry."] + [:url "https://github.com/getsentry/sentry-clj"] + [:licenses + [:license + [:name "Eclipse Public License"] + [:url "http://www.eclipse.org/legal/epl-v10.html"]]] + [:scm + [:url "https://github.com/getsentry/sentry-clj"] + [:connection "scm:git:git://github.com/getsentry/sentry-clj.git"] + [:developerConnection "scm:git:ssh://git@github.com/getsentry/sentry-clj.git"] + [:tag tag]]]) -(defn jar - "JAR the artifact. - - This task will create the JAR in the `target` directory. - " - [{:keys [tag] :or {tag version} :as opts}] - (-> opts - (assoc :lib library :version tag :tag tag) - (bb/clean) - (bb/jar))) - -(defn deploy - "Deploy the JAR to your local repository (proxy). - - This task will build and deploy the JAR to your - local repository using `deps-deploy`. This requires - the following environment variables being set beforehand: +(def ^:private revs (Integer/parseInt (b/git-count-revs nil))) +(def ^:private snapshot (the-version (format "%s-SNAPSHOT" (inc revs)))) +(def ^:private class-dir "target/classes") +(def ^:private target "target") - CLOJARS_URL, CLOJARS_USERNAME, CLOJARS_PASSWORD +(defn ^:private jar-opts + [{:keys [version] :as opts}] + (assoc opts + :lib library + :version version + :jar-file (format "target/%s-%s.jar" library version) + :basis (b/create-basis) + :class-dir class-dir + :target target + :src-dirs ["src"] + :pom-data (pom-template version))) - Even although they are CLOJARS environment variables, they - can actually point to anywhere, like your own Nexus OSS repository - or an Artifactory repository for example. - - You may want to consider something like `direnv` to manage your - per-directory loading of environment variables. - " - [{:keys [tag] :or {tag version} :as opts}] - (-> opts - (assoc :lib library :version tag :tag tag) - (bb/deploy))) +(defn jar + "This task will create the JAR in the `target` directory." + [{:keys [tag] :or {tag snapshot} :as opts}] + (let [{:keys [jar-file] :as opts'} (jar-opts (assoc opts :version tag))] + (println (format "Cleaning '%s'..." target)) + (b/delete {:path "target"}) + (println (format "Writing 'pom.xml'...")) + (b/write-pom opts') + (println (format "Copying source files to '%s'..." class-dir)) + (b/copy-dir {:src-dirs ["src" "resources"] :target-dir class-dir}) + (println (format "Building JAR to '%s'..." jar-file)) + (b/jar opts') + (println "Finished.")) + opts) (defn install - "Deploy the JAR to your local .m2 directory" - [{:keys [tag] :or {tag version} :as opts}] - (-> opts - (assoc :lib library :version tag :tag tag) - (bb/install))) + [{:keys [tag] :or {tag snapshot} :as opts}] + (let [{:keys [jar-file] :as opts'} (jar-opts (assoc opts :version tag))] + (dd/deploy {:installer :local + :artifact (b/resolve-path jar-file) + :pom-file (b/pom-path (select-keys opts' [:lib :class-dir]))}))) + +(defn publish + [{:keys [tag] :or {tag snapshot} :as opts}] + (let [{:keys [jar-file] :as opts'} (jar-opts (assoc opts :version tag))] + (dd/deploy {:installer :remote + :artifact (b/resolve-path jar-file) + :pom-file (b/pom-path (select-keys opts' [:lib :class-dir]))})))