sbt how to define scoped setting in scala code -


although i'm using multi project build projects, don't want put projects in 1 build. yet want able define settings in 1 place multiple builds. best way seems be, create scala file , link each project sub directory. creating following code in project sub directory:

import sbt._ import keys._ import addsettings._  object rbuild extends build {        override lazy val settings: seq[def.setting[_]] = super.settings ++ seq(   scalaversion := "2.11.7",   scalasource in compile := basedirectory.value / "src",   scalasource in test := basedirectory.value / "testsrc",          unmanagedsourcedirectories in compile := seq(basedirectory.value / "src"),   unmanagedsourcedirectories in test := seq(basedirectory.value / "src"),   scalacoptions ++= seq("-feature", "-language:implicitconversions", "-deprecation", "-target:jvm-1.8")) } 

the scalaversion works, none of settings source directories have effect on build, whether set individually or in combination. still same defaults. what doing wrong? i'm not sure if scalacoptions setting effective or not using inspect command in sbt terminal.

i came across searching solution different problem. set settings in project:

import sbt._ import keys._ import addsettings._  object rbuild extends build {   lazy val root = (project in file(".")).settings(   scalaversion := "2.11.7",   scalasource := (basedirectory.value / "src"),   scalasource in test := basedirectory.value / "testsrc",          unmanagedsourcedirectories in compile := seq(basedirectory.value / "src"),   unmanagedsourcedirectories in test := seq(basedirectory.value / "src"),   scalacoptions ++= seq("-feature", "-language:implicitconversions", "-deprecation", "-target:jvm-1.8"))        } 

although still doesn't answer question of why scalaversion worked not other settings. presume scalaversion must considered general setting while others project specific.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -