v0.7.0-RC1
The latest versions of scalafmt will only be published directly to Maven from now on. There will be no more fatjar releases here on Github or via homebrew. See 0cf3b79 for the long motivation behind this change.
TLDR; The recommended way to install scalafmt is now to
- install coursier: https://github.com/coursier/coursier#command-line-1
- run the following command to build a fatjar
sudo coursier bootstrap --standalone com.geirsson:scalafmt-cli_2.12:0.7.0-RC1 -o /usr/local/bin/scalafmt -f --main org.scalafmt.cli.Cli
With coursier you can benefit from
- cached downloads of shared dependencies between version upgrades (saving 5-10mb per upgrade)
- custom JVM options for the generated binary
- ability to generate slim 16kb bootstrap script by removing
--standalone, which can be committed to VCS
I admit that the long coursier command is harder to remember than homebrew upgrade scalafmt. Please pitch your ideas in coursier/coursier#324 (comment) about adding a syntax like coursier upgrade scalafmt