These are chat archives for sbt/sbt
A relaxed chat room about sbt (That interactive build tool). For getting help on sbt, we encourage people to document it on Stackoverflow or subscribing to Lightbend subscription.
XyIt. I want to enable
XyItin plugin only when IntergrationTest is enabled. I need to construct
override def projectConfigurations = Seq(Xy, XyIt)but only put
XyItconditionaly. How can ask if
IntegrationTestconfiguration is enabled in project. E.g when you use my plugin and say in your project
.configs(IntegrationTest)specific configuration from plug-in (from above
XyIt) will be enabled too. If you do not have
IntegrationItin your project, only basic configuration will be enabled (from above
.configs(…), isn’t it?
:=or similar macros.
IntegrationTestextensible configuration? I mean, can one write:
lazy val XyIt = config(“xy-it") extend IntegrationTest? It seems to be woirking in some strange way. When I define:
lazy val xyItSettings = inConfig(XyIt)( Defaults.itSettings )I do not have
xy-it:testtask at all, even when
Defaults.itSettingsis defined as
testSettings = configSettings ++ testTasks. Even
xy-it:compileis undefined. Is it how it should work?
Defaults.itSettingsinto your project settings directly, not under some configuration.
override def projectSettings: Seq[Def.Setting[_]] = Defaults.itSettings
lazy val itSettings: Seq[Setting[_]] = inConfig(IntegrationTest)(testSettings), i.e. just add the standard
IntegrationTestconfig. So if you scope them even further under your
XyItconfig, it’s probably not going to work.
lazy val xyItSettings = inConfig(XyIt)( Defaults.testSettings ). They are defined only as
lazy val testSettings: Seq[Setting[_]] = configSettings ++ testTaskswithoput any scoping. Am I right?
runtask, and set
javaOptions := “-Dconfig.resource=alternative.config”in my copy. The goal is to have a task that runs the project with an alternative config file (two deployments run from the same code-base with minor config file differences).
runOtherSitedepending on what I’m working on at the moment.
ConfigFactory.load()is called (which both projects do for you under the covers).
sbt -Denvironment=production build
/\s*log.debug(.*$/) then I think you might need to write an sbt plugin (or macro).
object, and i want to include a specific one in production
mappingsto filter out a
private.conffile (that’s included by
application.conf) from packaging for example. But I feel like I’ve seen examples for filtering build files/folders during compilation.
build.sbt:54: error: value value is not a member of sbt.SettingKey?
target/and reloading the project always fixes it
.valueway of defining settings, what's the right way to branch?
<<=we could do
a <<= if (x) b else cand a would end up depending on only one of
c... how do you get that behavior with