Build java jar

This commit is contained in:
Joseph Ferano 2026-08-26 10:36:43 +07:00
parent 1f6ed15833
commit a7e8309546

24
build.clj Normal file
View File

@ -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}))