0

My sbt project is based on this layout: Confused how to setup a multi project sbt project

How and where exactly should I set the scala and java version?

I'm currently have problems with java versions when deploying so I need to be more explicit about it.

Community
  • 1
  • 1
Blankman
  • 259,732
  • 324
  • 769
  • 1,199

1 Answers1

0

Easiest is to add this to Commons.settings (scalaVersion := "2.11.1"). You can still override the versions in project specific settings later.

It will look like this:

val settings: Seq[Def.Setting[_]] = Seq(
  version := appVersion,
  resolvers += Opts.resolver.mavenLocalFile,
  scalaVersion := "2.11.1"
)

And to override:

lazy val appWeb = (project in file("app-web")).
  settings(Commons.settings: _*).
  settings(playScalaSettings: _*).
  settings(scalaVersion := "2.10.3").
  dependsOn(appServices)

I'm not sure how you want to set the Java version though. But there's a post about it

Community
  • 1
  • 1
gzm0
  • 14,752
  • 1
  • 36
  • 64