From b0a6b67b5d0c385f5551661304463994d7be00ca Mon Sep 17 00:00:00 2001 From: Micah Date: Mon, 29 Jan 2024 16:35:27 -0700 Subject: [PATCH] fixed build to include compiled java classes --- CHANGES.md | 4 ++++ VERSION | 1 + dev/build.clj | 31 +++++++++++++++++++++++-------- 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 VERSION diff --git a/CHANGES.md b/CHANGES.md index bc16a69..ecedac3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +# 3.4.5 + +* 3.4.4 was a failed deploy... no compiled java code. + # 3.4.4 * fixes bug where `it` blocks were not executing within the namespace where they were declared. diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..4f5e697 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +3.4.5 diff --git a/dev/build.clj b/dev/build.clj index 3fad360..9b51f2b 100644 --- a/dev/build.clj +++ b/dev/build.clj @@ -9,9 +9,16 @@ (def basis (b/create-basis {:project "deps.edn"})) (def src-dirs (:paths basis)) (def lib (symbol group-name lib-name)) -(def version "3.4.4") +(def version (str/trim (slurp "VERSION"))) (def class-dir "target/classes") (def jar-file (format "target/%s-%s.jar" lib-name version)) +(def deploy-config {:coordinates [lib version] + :jar-file jar-file + :pom-file (str/join "/" [class-dir "META-INF/maven" group-name lib-name "pom.xml"]) + :repository {"clojars" {:url "https://clojars.org/repo" + :username (System/getenv "CLOJARS_USERNAME") + :password (System/getenv "CLOJARS_PASSWORD")}} + :transfer-listener :stdout}) (defn clean [_] (println "cleaning") @@ -24,8 +31,16 @@ :lib lib :version version})) +(defn javac [_] + (println "compiling java") + (b/javac {:src-dirs ["src"] + :class-dir class-dir + :basis basis + :javac-opts ["--release" "11"]})) + (defn jar [_] (clean nil) + (javac nil) (pom nil) (println "building" jar-file) (b/copy-dir {:src-dirs src-dirs @@ -42,14 +57,14 @@ (shell/sh "git" "tag" version) (shell/sh "git" "push" "--tags"))))) +(defn install [_] + (jar nil) + (println "installing " (:coordinates deploy-config)) + (aether/install deploy-config)) + (defn deploy [_] (tag nil) (jar nil) - (aether/deploy {:coordinates [lib version] - :jar-file jar-file - :pom-file (str/join "/" [class-dir "META-INF/maven" group-name lib-name "pom.xml"]) - :repository {"clojars" {:url "https://clojars.org/repo" - :username (System/getenv "CLOJARS_USERNAME") - :password (System/getenv "CLOJARS_PASSWORD")}} - :transfer-listener :stdout})) + (println "deploying " (:coordinates deploy-config)) + (aether/deploy deploy-config))