Howto sync SBT Module with latest STB version?

Answered

Using IJ v14.1.6, Scala 2.11.7, SBT v0.13.9, Xubuntu 14.04.03 x64

When creating a brand new project (Scala, SBT). The project property screen only allow to select SBT version 0.13.8. I have updated SBT to the latest version. As shown at the command line:

$ sbt 'inspect sbtVersion'
[info] Setting: java.lang.String = 0.13.9

$ scala -version
Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL

Question: How does IntelliJ acquire information about the SBT environment installed in my dev machine? How to make IJ aware of the latest SBT version?

Thank you very much in advance for any help.

3 comments
Comment actions Permalink
Official comment

IDEA uses bundled sbt-launch.jar unless otherwise specified in Settings / Build Tools / SBT / Launcher.

By default, project SBT version is equal to SBT launcher version.

However, project SBT version is actually independent from the launcher version, so you can explicitly specify desired version as "sbt.version=xxx" in [project directory]/project/build.properties (which considered a good practice, by the way).

P. S. and don't forget to refresh the project afterwards (from SBT tool window).

Comment actions Permalink

Hi Pavel,

Thanks for your detailed answer. Also found solution in SBT manual http://www.scala-sbt.org/release/docs/Hello.html

BTW, if the bundled sbt-launch.jar is version 0.13.8 and I change "sbt.version=0.13.9" in [project directory]/project/build.properties

Is there any harmful effect? This is strange as I wonder how the bundled sbt-launch.jat would have the behavior of the new version. I suppose I should set modify the settings to use custom sbt-launch.jar? (in my machine it is located at /usr/share/sbt-launcher-packaging/bin/)

0
Comment actions Permalink

It's perfectly legitimate to specify SBT version that is greater than SBT launcher's version. Please note that it's "launcher" which is bundled, not "SBT" itself. The launcher can bootstrap (almost) arbitrary version of SBT. It's just a particular case that SBT version is equal to launcher version, by default.

0

Please sign in to leave a comment.