I asked some questions on slack related to this, and in case anyone else was confused like me thinking tools.build is a new framework for managing build tasks, that does not seem the be intent.<p>tools.build is a helper lib to write programs that make artifacts such as Jars or Uberjars. It competes with things like depstar in that sense.<p>Tasks are still meant to be managed by deps.edn (tools.deps) and the Clojure CLI by having tasks be Clojure programs that are invokable as either -X, -T or -M, and the idea is you would orchestrate them with another tool like make, a shell command or script, babashka task runner, npm scripts, just etc.<p>This means that any Clojure program can be a "task". All you need to add a new task to a project is define an alias for it in the project deps.edn.<p>Now one caveat is depending on the type of program the task is, you might need to call the alias with either -X, -T or -M option:<p><pre><code> clojure -T:alias
clojure -X:alias
clojure -M:alias
</code></pre>
Ideally all Clojure programs that implement a task move to rely on exec-fns, and thus would be called with -T or -X, which will eventually allow you to chain tasks together where the return of the first task exec-fn will be passed to the next task's exec-fn, so you can compose tasks and run them consecutively from the clojure CLI.<p>So tools.build is just a lib that you can use to help you write tasks (which are just normal Clojure programs), but it is itself a set of exec-fns tasks which you can use directly as an alias as well:<p><pre><code> clojure -T:build-api copy-file :src '"./src/tempo.clj"' :target '"./output/tempo.clj"'
</code></pre>
with alias as:<p><pre><code> :build-api {:deps {io.github.clojure/tools.build {:git/tag "v0.1.6" :git/sha "5636e61"}}
:ns-default clojure.tools.build.api}</code></pre>