I’ve recently ran into issue where our projects were expecting to run with SBT version
0.13.12, but the only version that was installing with home-brew via
brew install sbt was
I’ve Googled and realized that I can install older version with
brew install email@example.com but this installed version
0.13.16 which was still incompatible with our projects.
After few hours of pulling my hair out a co-worker pointed out that I can specify needed
sbt version via command line as such:
sbt -sbt-version 0.13.12 and it work, but it would be very painful to run it like that every time.
I was thinking of adding an alias, but then I saw something in logs when re-installing sbt one more time.
Global settings should be placed in /usr/local/etc/sbtopts
I’ve opened the
/usr/local/etc/sbtopts in editor, uncommented and edited the following:
Code language: CSS (css)
# Sets the SBT version to use. -sbt-version 0.13.12
sbt ran with the needed version, even though I had version
Another way of setting sbt version (as was suggested in comments) is at project level. To do so:
sbt sbtVersionto pick up version from