{:tasks {:requires ([babashka.fs :as fs] [clojure.string :as str]) :init (let [windows? (str/starts-with? (System/getProperty "os.name") "Windows")] (if windows? (do (println "Cannot run on Windows !") (System/exit 1)))) clean {:doc "Removes target folder." :task (fs/delete-tree "target")} nrepl {:doc "Starts a nrepl session." :task (apply clojure "-M:nrepl" *command-line-args*)} storm {:doc "Starts a nrepl session with storm debugger." :task (apply clojure "-M:storm" *command-line-args*)} cli:run:main {:doc "Run's main CLI function." :task (apply shell {:dir "cli"} "clojure -M -m cli.cli" *command-line-args*)} cli:build:jar {:doc "Builds uberjar for CLI." :task (shell {:dir "cli"} "clojure -T:build ci")} cli:run:jar {:doc "Runs CLI jar." :depends [cli:build:jar] :task (apply shell "java -jar target/cli/cljcc-cli.jar" *command-line-args*)} cli:build:native {:doc "Builds native image for CLI." :depends [cli:build:jar] :task (shell {:dir "target/cli"} "native-image" "-jar" "cljcc-cli.jar" "-o" "cljcc-cli" "-Ob" ; quick compilation flag for development "-H:+ReportExceptionStackTraces" "--features=clj_easy.graal_build_time.InitClojureClasses" "--initialize-at-build-time" "--report-unsupported-elements-at-runtime" "--verbose" "--no-fallback")}}}