These are chat archives for sbt/sbt

4th
Dec 2016
Nguyễn Văn Viên
@viennv1709
Dec 04 2016 04:44
Hi guys,
How to finish compile code then start perform testing
lazy val dbMigration = TaskKey[Unit]("Run fly migration before testing.")

dbMigration := {
  Process("sbt" :: "project infrastructure" :: "flywayClean" :: Nil, baseDirectory.value) !

  Process("sbt" :: "project infrastructure" :: "flywayMigrate" :: Nil, baseDirectory.value) !
}

compile in Test := ((compile in Test) dependsOn dbMigration).value
It seems that run compile and test asynchronously
Saad Malik
@saamalik
Dec 04 2016 06:03
Hey guys!

I have a small question on overriding settings in a multi-build project. If anyone has a couple minutes, please take a look at the question Overriding multi-build project settings.

Thank you in advance!

Nayana Hettiarachchi
@devzer01
Dec 04 2016 14:11
@saamalik for multi projects stuff using a Build.scala makes it much easier
at least for me, i have put the multi project configuration in a scala file in /project
then for each of the project() that you define in the /project/Build.scala you can specify common + overridden settings
Srepfler Srdan
@schrepfler
Dec 04 2016 17:17
guys, can I somehow disble fetching of sources for an artefact? its breaking my build
[error] (*:update) sbt.ResolveException: download failed: com.smile.you#you-scala_2.11;1.8.2.0!you-scala_2.11.java-source
OlegYch
@OlegYch
Dec 04 2016 17:21
update doesn't download sources
usually
Srepfler Srdan
@schrepfler
Dec 04 2016 17:21
yes, but somehow it does...
looking at the jar ivy-1.8.2.0.xml
Ryan Williams
@ryan-williams
Dec 04 2016 17:23

@dwijnand

yeah, define things in terms of scalaVersion.value

OK, so if I want to set sbt-scoverage’s

coverageHighlighting := false

only in my 2.10.6 builds, I should do something like:

coverageHighlighting := (
  if (scalaVersion.value == “2.10.6”)
    false
  else 
    coverageHighlighting.value
)

?

Srepfler Srdan
@schrepfler
Dec 04 2016 17:23
it references it via <artifact name=“you-scala_2.11" type="java-source" ext="java-source" conf="master"/>
OlegYch
@OlegYch
Dec 04 2016 17:24
no idea what java-source is
my guess is that your program won't build without it though
otherwise you can try exclude
Srepfler Srdan
@schrepfler
Dec 04 2016 17:32
if I try exclude, the artifact having the same name and group essentially excludes itself
OlegYch
@OlegYch
Dec 04 2016 18:30
you can exclude a specific configuration and artifact
Srepfler Srdan
@schrepfler
Dec 04 2016 18:51
I think I know what happened here
the you-scala java-source gets published after the main artefact and the pom gets overwritten by the source one which is essentially empty
so the main jar actually sucks in the source-jar pom
somebody has a broken build process
Shane Delmore
@ShaneDelmore
Dec 04 2016 23:49
Is there a way in sbt to determine which specific resolver/url a download was found at?
When it fails I see a list of what it tried, but when it succeeds I don't know which one worked.
OlegYch
@OlegYch
Dec 04 2016 23:54
see ~/.ivy2/cache/*/.properties
Shane Delmore
@ShaneDelmore
Dec 04 2016 23:55
I'll check it out, thanks.