From a7e8309546d9d6f6c607eb144ed577e0a3d2ab5d Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Wed, 26 Aug 2026 10:36:43 +0700 Subject: [PATCH] Build java jar --- build.clj | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 build.clj diff --git a/build.clj b/build.clj new file mode 100644 index 0000000..0a7450f --- /dev/null +++ b/build.clj @@ -0,0 +1,24 @@ +(ns build + (:require [clojure.tools.build.api :as b])) + +(def basis (b/create-basis {:project "deps.edn"})) +(def class-dir "target/classes") +(def uber-file "target/siam-farmer.jar") + +(defn uber [_] + (b/delete {:path "target"}) + (b/copy-dir {:src-dirs ["src"] + :target-dir class-dir}) + (b/compile-clj + {:basis basis + :src-dirs ["src"] + :class-dir class-dir + :ns-compile ['watch 'rl 'engine 'game] + :java-opts + ["--enable-native-access=ALL-UNNAMED" + "-Dwatch.dev=false" + "-Draylib.path=/home/joe/.local/bin/odin/vendor/raylib/linux/libraylib.so.600"]}) + (b/uber {:class-dir class-dir + :uber-file uber-file + :basis basis + :main 'game}))