poly
Search…
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
1
{
2
...
3
:aliases {:poly {:extra-deps {polylith/clj-poly
4
{:mvn/version "0.2.14-alpha"}}
5
:main-opts ["-m" "polylith.clj.core.poly-cli.core"]}}
6
...
7
}
Copied!
Via GitHub
1
{
2
...
3
:aliases {:poly {:extra-deps {polylith/clj-poly
4
{:git/url "https://github.com/polyfy/polylith.git"
5
:sha "INSERT_LATEST_SHA_HERE"
6
:deps/root "projects/poly"}}
7
:main-opts ["-m" "polylith.clj.core.poly-cli.core"]}}
8
...
9
}
Copied!
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:
1
clojure -M:poly version
Copied!
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):
1
polylith/clj-api {:mvn/version "0.2.14-alpha"}
Copied!
or
1
polylith/clj-api {:git/url "https://github.com/polyfy/polylith.git"
2
:sha "ecd2cf2ede81ecd4fbf82f21a075b103b6f2d2af"
3
:deps/root "projects/api"}
Copied!
...and remember to set the :sha to an existing SHA.
Export as PDF
Copy link
Contents