These are chat archives for sbt/sbt

6th
Dec 2016
drhumlen
@drhumlen
Dec 06 2016 13:04

How do you trigger a task only when building for deployment?

resourceGenerators in Compile += Def.task {
  streams.value.log.info("running npm generator")
  Process("npm" :: "run" :: "build" :: Nil, file("client/")).!

  IO.listFiles(file("client/build")).toList
}.taskValue

This, unfortunately, runs every time you do anything. Is there a way to say something resourceGenerators in Stage?

Edmondo Porcu
@edmondo1984
Dec 06 2016 16:46
Hello folks, I can't resolve sbt-release plugin. anyone knows if there's a custom resolver to be configured? I can't find anything on the guide
Sam Halliday
@fommil
Dec 06 2016 17:05
hmm, I'm getting a failure in sbt-assembly due to duplicate file named LICENSE but the rename strategy is being applied. Does rename perhaps do a no-op if the dupes are in user modules instead of third party libs?
raised sbt/sbt-assembly#224
Daniel Cazares
@danielchristiancazares
Dec 06 2016 19:49
@fommil Have you tried to discard the files?
OlegYch
@OlegYch
Dec 06 2016 21:56
huh
help +++
or inspect
doesn't sound like smth standard
Derek Wickern
@dwickern
Dec 06 2016 21:58
if I use strict dependency management, I get this error:
org.scala-lang#scala-library;2.11.7 (needed by [com.typesafe.play#play-json_2.11;2.5.4]) conflicts with org.scala-lang#scala-library;2.11.8 (needed by <my project>)
do I have to use dependencyOverrides to silence it?
that doesn't seem ideal, because any future dependency conflicts related to scala-library will be silenced
I guess I could add an exclusion on Play's dependency
OlegYch
@OlegYch
Dec 06 2016 22:03
afaik strict dependency manager is not viable
ymmw
the best attempt i've seen was sbt-typelevel
Derek Wickern
@dwickern
Dec 06 2016 22:04
yeah. for every real conflict i get 10 dumb ones like above
Edmondo Porcu
@edmondo1984
Dec 06 2016 22:08

I feel dumb but I can't find out why , when building a plugin that depends on other plugins, if I add the plugins as settings like so
lazy val slick-extension = (project in file("sbt-slick=-extension")).settings( commonSettings, libraryDependencies ++= slickLibraries, sbtPlugin := true, scalaVersion := "2.11.8", name := "sbt-slick-extension", addSbtPlugin("org.flywaydb" % "flyway-sbt" % "4.0.3"), addSbtPlugin("com.tapad" % "sbt-docker-compose" % "1.0.11") )

the plugins are not resolved. I put in my project/plugins two resolvers, typesafe releases and flyway resolver. But sbt can't download the plugins :(

OlegYch
@OlegYch
Dec 06 2016 22:09
sbt plugins are currently on scala 2.10
Edmondo Porcu
@edmondo1984
Dec 06 2016 22:14
damn :( was it that simple?
ahah