Show Sbt's Scala Version

show sbt scala version

set scala version at build.sbt

1
scalaVersion := "2.11.8"

show sbt version

1
2
3
4
5
6
7
sbt about

[info] This is sbt 0.13.11
[info] The current project is {file:/path/to/object/}object_name
[info] The current project is built against Scala 2.11.7
[info] Available Plugins: sbt.plugins.IvyPlugin, ******
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.6

this can show sbt version project path plugins scala version

set and show scalacOptions

add feature parameter to scalacOptions

1
set scalacOptions += "-feature"

show scalacOptions

1
2
3
show scalacOptions 

[info] List(-deprecation, -unchecked, -encoding, utf8, -feature)

show scalaInstance, this will show scala version, library jar and compiler jar

1
2
3
[info] Scala instance{version label 2.11.6, actual version 2.11.6,
library jar: /home/oo/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.6.jar,
compiler jar: /home/oo/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.6.jar}

sbt history commands

sbt shell remembers history, even if you exit sbt and restart it. The simplest way to access history is with the up arrow key. The following commands are also supported:

1
2
3
4
5
6
7
8
!         Show history command help.
!! Execute the previous command again.
!: Show all previous commands.
!:n Show the last n commands.
!n Execute the command with index n, as shown by the !: command.
!-n Execute the nth command before this one.
!string Execute the most recent command starting with 'string.'
!?string Execute the most recent command containing 'string.'

Specifying the sbt version

In project/build.properties that specifies the sbt version as follows:

1
sbt.version=0.13.15