Skip to content

Commit

Permalink
Add warning to build when using jdk>=21 for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
wardle committed Nov 14, 2024
1 parent e72929f commit bcc0df1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,18 @@
(jar nil)
(dd/deploy {:installer :remote, :artifact jar-file
:pom-file (b/pom-path {:lib lib, :class-dir class-dir})}))

(defn- check-jvm
[]
(let [jvm-version (-> (System/getProperty "java.specification.version") Integer/parseInt)]
(when (>= jvm-version 21)
(throw (ex-info "Not building with jdk >= 21 because of the SequencedCollection issue." {})))
(println "Building with jdk" jvm-version)))

(defn uber
"Build an executable uberjar file for HTTP server and CLI tooling."
[{:keys [out] :or {out uber-file}}]
(check-jvm)
(println "Building uberjar:" out)
(update-citation nil)
(clean nil)
Expand Down Expand Up @@ -112,4 +121,4 @@
:repo "hermes"
:tag (str "v" version)
:file uber-file
:sha256 true}))
:sha256 true}))

0 comments on commit bcc0df1

Please sign in to comment.