poly
Search…
⌃K

Use as dependency

An alternative way of executing the poly tool is to specify it as a dependency, by giving a commit SHA. To use it this way, add one of the following aliases to the :aliases section in your deps.edn.
Via Clojars
{
...
:aliases {:poly {:extra-deps {polylith/clj-poly
{:mvn/version "0.2.14-alpha"}}
:main-opts ["-m" "polylith.clj.core.poly-cli.core"]}}
...
}
Via GitHub
{
...
:aliases {:poly {:extra-deps {polylith/clj-poly
{:git/url "https://github.com/polyfy/polylith.git"
:sha "INSERT_LATEST_SHA_HERE"
:deps/root "projects/poly"}}
:main-opts ["-m" "polylith.clj.core.poly-cli.core"]}}
...
}
Replace INSERT_LATEST_SHA_HERE with a commit SHA from the Polylith repository (e.g. the latest).
Once we have added one of the aliases above, we can now use the poly tool from the terminal:
clojure -M:poly version
We will soon create our first workspace but before that is done, only the version , help , and create workspace commands will work.

Add other Polylith artifacts as a dependency

Similarly, you can use other artifacts from this repository, clj-api or clj-poly-migrator as dependencies. For example, in order to add clj-api as a dependency, add one of the following to your :deps section in your deps.edn file (make sure to use the latest release):
polylith/clj-api {:mvn/version "0.2.15-alpha"}
or
polylith/clj-api {:git/url "https://github.com/polyfy/polylith.git"
:sha "ecd2cf2ede81ecd4fbf82f21a075b103b6f2d2af"
:deps/root "projects/api"}
...and remember to set the :sha to an existing SHA.