A Boot task that uses tools.deps(.alpha)
to read in deps.edn
files in the same way that the clj
script uses them (almost).
You can either add this to your build.boot
file's :dependencies
:
[seancorfield/boot-tools-deps "0.1.4"]
and then expose the task with:
(require '[boot-tools-deps.core :refer [deps]])
or you can just add it as command line dependency:
boot -d seancorfield/boot-tools-deps:0.1.4 ...
The available arguments are:
-c
--config-files
-- specify thedeps.edn
files to be used-A
--aliases
-- shorthand for specifying-R
and-C
with the same alias-R
--resolve-aliases
-- specify the aliases for resolving dependencies-C
--classpath-aliases
-- specify the aliases for classpath additions-r
--repeatable
-- use only the localdeps.edn
file (or the-c
specified files)-v
--verbose
-- explain what the task is doing (this also makestools.deps
verbose)
Differences from how clj
works:
- The "system"
deps.edn
file is not read butboot-tools-deps
merges in a copy taken from theclojure/brew-install
repository so the effect should be the same. This means the defaultdeps.edn
information may lag behind the latest, distributed/installed version, or may be ahead of the version you actually have installed (if you have not updatedclojure
recently). The version of Clojure used is whatever version is running by the time this task is run -- you can only change that viaBOOT_CLOJURE_VERSION
or~/.boot/boot.properties
, not viadeps.edn
. clj
computes the full classpath and caches it in a local file.boot-tools-deps
does not do this (since it does not perform the final classpath computation -- it just updates the dependencies and paths so Boot itself can deal with that).- Whatever value of
:paths
comes back fromtools.deps
is used as the:resource-paths
value for Boot. Similarly, whatever value of:extra-paths
comes back is used as the:source-paths
value. This allows you to specify"src"
and"test"
(or whatever your project's equivalent are) indeps.edn
, with aliases as needed, and haveclj
andboot deps
behave in much the same way. boot-tools-deps
does not support:local
dependencies (yet!).
- 0.1.4 -- 12/06/2017 -- Fix #3 by updating
deps.edn
template frombrew-install
(changes Clojars repo URL); fix #4 by correcting how-r
and-c
options affect the list ofdeps.edn
files used; switches fromHOME
environment variable touser.home
system property; adds-A
option for when you need the same alias on both-R
and-C
; now relies ontools.deps.alpha.makecp
loading all the specific providers (instead of loading them manually). - 0.1.3 -- 11/15/2017 -- Fix #2 by using
deps.edn
template frombrew-install
repo as defaults. - 0.1.2 -- 11/13/2017 -- Expose
deps
task machinery as a function,load-deps
, for more flexibility. - 0.1.1 -- 11/12/2017 -- First working version.
Copyright © 2017 Sean Corfield, all rights reserved.
Distributed under the Eclipse Public License version 1.0.