Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update SBT version using homebrew?

I installed SBT v0.12.4. Now I want to update it to v0.13.x, so I have used the command

brew install sbt

It says that it has correctly installed SBT 0.13.x. but if I ask on terminal the version of SBT, it says 0.12.4. How to update it?

like image 605
Alessio Crestani Avatar asked Nov 03 '14 15:11

Alessio Crestani


People also ask

How can I change sbt version?

In the Project tool window, in the source root directory, locate the build. properties file and open it in the editor. In the editor explicitly specify the version of sbt that you want to use in the project. The newer sbt versions(1.0 +) will create the build.

How do I know sbt version installed?

Run the SBT console and then type sbtVersion to check the SBT version, and scalaVersion for the Scala runtime version.


1 Answers

There are two sbt versions:

  1. The sbt-launcher. This is used to download and run a particular sbt version. This is what you installed with brew. If you type sbt --version it should tell you the version of the launcher brew installed.

  2. sbt itself (for building projects). This is controlled via a project/build.properties file by project. So one launcher can launch many versions of sbt, and is generally backwards compatible. To update this version, simple change the sbt.version property in project/build.properties.

like image 86
jsuereth Avatar answered Sep 21 '22 09:09

jsuereth