0
votes

I'm working on my first play application. I uses the Typesafe activator to generate an empty Play (Scala Only) project. The layout is a little different from what is generated when Iuse giter8 to generate scala projects. There is a build.sbt which has the top level build definitions defined in the Project root folder.

Typically there is a tag called scalaVersion where I can specify the scalaVersion I want for the project, but there is no such tag in the automatically generated build.sbt from activator. Of course, no biggy, I can just add it there myself. My question is, what is the default scalaVersion used when none is specified ?

EDIT: Actually specifying the scalaVersion in the build.sbt file didn't override the Scala Version for the project. I specified 2.10.3 but I get 2.10.2. Any clues on how to override the Setting and where does the default setting come from ?

1

1 Answers

2
votes

This should work. I just tried this with the hello-scala template:

jamesw@T430s:~/Desktop$ activator new

Enter an application name
> scala-bump

Fetching the latest list of templates...


The new application will be created in /home/jamesw/Desktop/scala-bump

Browse the list of templates: http://typesafe.com/activator/templates
Enter a template name, or hit tab to see a list
> hello-scala

I edited the build.sbt and updated the scalaVersion:

scalaVersion := "2.10.3"

The tested by outputting the Scala version in src/main/scala/Hello.scala:

object Hello {
  def main(args: Array[String]): Unit = {
    println(scala.util.Properties.versionString)
  }
}

Then running the app via activator run I get:

[info] Compiling 1 Scala source to /home/jamesw/Desktop/scala-bump/target/scala-2.10/classes...
[info] Running Hello 
version 2.10.3
[success] Total time: 3 s, completed Jan 31, 2014 12:06:18 AM