The project I linked to demonstrates a complicated SBT build.sbt file for a multi-project build.
I just started using a new version of SBT, and when I went to run a test I got this SBT warning message:
At the moment this is kind of funky, but I find that the best way to determine the version of SBT is to move to a temporary directory and then run the
sbt sbtVersion command:
As a quick note to self, here’s an example of how to set
scalacOptions in an SBT build.sbt file:
scalacOptions ++= Seq( "-Xfatal-warnings", "-deprecation", "-feature", "-unchecked", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-language:postfixOps" )
scalacOptions lets you set Scala compiler options in your SBT project build.
If/when you need to know what keys are available in a Scala SBT build.sbt file, you can find them all listed in the Keys object. At the current moment, here’s the Scaladoc for the SBT Keys object.
Note that the first two SBT keys you’ll probably see are
This page is a collection of popular tools, libraries, and frameworks for the Scala programming language.Back to top
libraryDependencies ++= Seq( guice, "org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test, jdbc, "mysql" % "mysql-connector-java" % "5.1.46", "com.typesafe.play" %% "anorm" % "2.5.3" )
[error] (run-main-0) java.lang.OutOfMemoryError: GC overhead limit exceeded java.lang.OutOfMemoryError: GC overhead limit exceeded
The solution to the problem was to allocate more memory when I start SBT. To give SBT more RAM I first issue this command at the command line:
If you want to use Lightbend Config configuration files in your Scala or Java application, here’s a quick example of how to configure and use Lightbend Config in your application. In this case I’m specifically using Scala and SBT.