Skip to content

Instantly share code, notes, and snippets.

@jjttjj

jjttjj/build.clj Secret

Last active March 8, 2023 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjttjj/1b3cac66deb6ece27cb05d1f1f493245 to your computer and use it in GitHub Desktop.
Save jjttjj/1b3cac66deb6ece27cb05d1f1f493245 to your computer and use it in GitHub Desktop.
(ns build
(:require [clojure.tools.build.api :as build]
[clojure.java.io :as io]))
(io/make-parents "classes/x")
(defn build [_]
(let [basis (build/create-basis {:project "deps.edn"})]
(build/uber {:class-dir "classes"
:uber-file "uber.jar"
:basis basis})))
;;; when called from repl:
;;; RuntimeException No dispatch macro for: ?
(comment
(build nil))
{:deps
{com.cognitect.aws/api {:mvn/version "0.8.641"}
tick/tick {:mvn/version "0.6.0"}
;; to depend on the latest version when used from a repl
io.github.clojure/tools.build {:git/tag "v0.9.3" :git/sha "e537cd1"}}
:aliases
{:build {:deps {io.github.clojure/tools.build {:git/tag "v0.9.3" :git/sha "e537cd1"}}
:ns-default build}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment