These are chat archives for sbt/sbt

18th
Jun 2017
Jorge
@jvican
Jun 18 12:00
@igmar I'm sorry but I don't get that question. What do you mean?
Igmar Palsenberg
@igmar
Jun 18 12:08
I have A -> B -> C, where C depends on B and A. Ik want to force version overrides in B, so that C enherits all dependencies from B and thus A
@jvican now I have to override them in both B and C
I want to say : inherit from B, unless overridden
Where A is Play, and B a common module, and C the application itself
Jorge
@jvican
Jun 18 12:16
I have no idea how to do that, I've never had that need
It should have everything you need to do that
Igmar Palsenberg
@igmar
Jun 18 15:23
I checked that, didn't tell me the right things
Sukant Hajra
@shajra
Jun 18 20:47
I normally only use the ".value" macro on the right-hand side of a setting... but is there a way to conditionally apply a setting based on a value. Like if I wanted to do something like if (someKey.value) addCompilerPlugin(somePlugin) else List.empty
I'm pretty sure that won't compile.
Sukant Hajra
@shajra
Jun 18 20:57
I suppose in this specific case, I can do something like libraryDependencies ++= { if (someKey.value) List(compilerPlugin(somePlugin) else List.empty }
Sukant Hajra
@shajra
Jun 18 21:03
Also, I just realized I don't know the best way to set a global setting in a .sbt file. Is that possible? It seems like all the settings in a .sbt file seem set at the project level.
Sukant Hajra
@shajra
Jun 18 21:08
hmm... using "inThisBuild" inside the project-level settings seems really counter-intuitive to me: http://www.scala-sbt.org/0.13/docs/Scopes.html#Build-level+settings
But I guess it works because it removes a "This" out of the key references, which essentially makes it no-longer a candidate for project-level scoping.