These are chat archives for sbt/sbt

19th
Mar 2016
Matthew de Detrich
@mdedetrich
Mar 19 2016 09:10
Does anyone know if there is an easy way to shade a dependency with SBT?
I know that sbt-assembly has this option, but I don’t want to remove all dependencies, I just want to shade a specific class before the project is built
Dale Wijnand
@dwijnand
Mar 19 2016 14:53
sbt-assembly uses pants maintained fork of jar-jar: so I guess try and bring that into the metabuild and use it programmatically
sbt/website#234
opinions?
Barnabás Oláh
@stsatlantis
Mar 19 2016 16:15
there is typo :) artifact i guess
@soc
argh :-)
Barnabás Oláh
@stsatlantis
Mar 19 2016 16:31
but i like concept :)
Lukas Rytz
@lrytz
Mar 19 2016 19:15

howdy! because X (details not relevant here) the scala/scala sbt build cannot be imported into intellij, so we keep IntelliJ project definitions in the repo. i recently worked on an sbt task that keeps the dependency classpaths in the IntelliJ project definition up-to-date (scala/scala#5046), which works fine.

There's one missing piece: we have an IntelliJ module to edit the SBT build itself. On that module's classpath there's all kinds of sbt things, a list that Jason originally took from a different project's IntelliJ definitions (https://github.com/scala/scala/blob/2.12.x/src/intellij/scala-build.iml.SAMPLE#L17). My question: how can I get the list of dependencies for the sbt build itself? My idea was to cd project and run > show dependencyClasspath, but that doesn't include sbt itself.
I also tried > show fullClasspath, but that gives errors, the first is:

> show fullClasspath
[info] Compiling 8 Scala sources to /Users/luc/scala/scala/project/target/scala-2.10/classes...
[error] /Users/luc/scala/scala/project/JarJar.scala:7: not found: object sbt
[error] import sbt._
[error]        ^
Dale Wijnand
@dwijnand
Mar 19 2016 22:00
@lrytz don't cd project, sbt in normally then 'reload plugins'. Then show whatever pieces you need