These are chat archives for sbt/sbt

15th
May 2017
Guillaume Martres
@smarter
May 15 00:06
in an sbt plugin I can define things using buildSettings and projectSettings, but there doesn't seem to be anything like a configurationSettings, is there?
Some settings/tasks are defined on all configurations but not on projects, so I can't just use them in projectSettings without getting an error when the plugin is loaded
Dale Wijnand
@dwijnand
May 15 00:14
globalSettings/buildSetting/projectSettings are all options for the project scope. Configuration is a different axis completely.
However, your request sounds similar to sbt/sbt#2534
Guillaume Martres
@smarter
May 15 00:20
Thanks for the pointer, Defaults.derive might work for my usecase
marios iliofotou
@imarios
May 15 01:14
@dwijnand will do, thank you
Guillaume Martres
@smarter
May 15 02:04
I find it somewhat surprising that foo/internalDependencyClasspath will trigger compilation of all the projects that foo depends on. Is there a way to get the classpath without compiling anything? And is this behaviour intended?
Dale Wijnand
@dwijnand
May 15 07:03
@smarter lookup Def.derive in the issue tracker: I can't rememeber the details, but there are some concerns with Def.derive :-/
Moritz Bust
@Busti
May 15 09:44
Hi,
how do I add a local library in a libs/ folder to a multi-project?
It is added automatically with normal projects, so I do not know what to put in my settings.
Dale Wijnand
@dwijnand
May 15 09:47
Add it to the lib directory inside the module. So, for example, foo/lib/x.jar
here's the relevant documentation page http://www.scala-sbt.org/0.13/docs/Library-Management.html
Moritz Bust
@Busti
May 15 09:48
Thanks, that's way easier than I anticipated.
It just does not feel right. What if I wanted to use the library from another module?
Dale Wijnand
@dwijnand
May 15 09:55
look at that page. There's a part that starts "If you want to add jars from multiple directories in addition to the default directory"
which shows a moderately complex example
Moritz Bust
@Busti
May 15 10:35
Does baseDirectory contain projectRoot/libs/ by default or do I have to add it?
Dale Wijnand
@dwijnand
May 15 10:51
By default it will look for jars in projectRoot/lib
Moritz Bust
@Busti
May 15 11:15
Okay, I encountered another problem along the way.
I am trying to have a (sub)project with scalajs but for some reason it does not contain the fastOptJS task.
Moritz Bust
@Busti
May 15 11:23
G. Richard Bellamy
@rbellamy
May 15 18:43
@geoHeil I've left you another comment
Aruj Padbidri
@aruj244
May 15 20:42

Hi all, I have a question regarding bundling of specific projects in a multi-project build. As an example, let's say we have 5 projects in my SBT project:
A - stand alone
B - stand alone
C - depends on B
D - stand alone
E - depends on D

Now, I want the following bundles: A, B + C, and D + E = three jars when I build the project and package it. How do I accomplish this?

OlegYch
@OlegYch
May 15 21:08
sbt-nativepackager or sbt-assembly