A relaxed chat room about sbt (the interactive build tool). Also good for sbt help: Stack Overflow, or Lightbend subscription. https://www.scala-sbt.org/support.html has advice on where to go.
eed3si9n on 0.13
Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 3 more (compare)
eed3si9n on fixbuild
eed3si9n on fixbuild
Fix typo (compare)
eed3si9n on fixbuild
Adds bundledLauncherProj to all… Remove launcher tests Add unit tests to Travis and 1 more (compare)
eed3si9n on scalaversionbump
eed3si9n on 0.13
Bumping up Scala version to 2.1… Try to keep bincompat Fixes #1666 and 1 more (compare)
eed3si9n on scalaversionbump
Fixes #1666 (compare)
unmanagedResources in Compile += Def.task {
val temp = IO.createTemporaryDirectory
"curl --silent https://example.com/main-module/-/main-module-0.0.2.tgz" #| s"tar -xf -C$temp" !
(unmanagedResourceDirectories in Compile) += temp
}.taskValue
val zeroCrossSettingsTemplate = Seq(
unmanagedSourceDirectories := unmanagedSourceDirectories.value.filter(f => ! f.getName.startsWith("scala-")),
managedSourceDirectories := Seq()
)
val zeroCrossSettings = inConfig(Compile)(zeroCrossSettingsTemplate) ++ inConfig(Test)(zeroCrossSettingsTemplate)
Command
s suck
How can I refer to a scoped key programmatically? I.e. what is the programmatic equivalent of e.g. scalafmt::test
?
Context: neo-sbt-scalafmt defines a TaskKey scalafmt
that formats your sources, but it also defines a scope called test
(https://github.com/lucidsoftware/neo-sbt-scalafmt/blob/master/sbt-scalafmt/src/main/scala/com/lucidchart/sbt/scalafmt/ScalafmtCorePlugin.scala#L143) that only checks if the sources are in line with the expected format. Depending on a SettingKey the TaskKey scalaFmt
is invoked before compile
. I want to introduce a new SettingKey that invokes scalafmt::test
instead. The below compiles, but always runs scalafmt
, not scalafmt::test
.
if (scalafmtOnCompile.value) scalafmt in resolvedScoped.value.scope
else if (scalafmtTestOnCompile.value) (test in scalafmt) in resolvedScoped.value.scope
scalafmt
task scope, that's the scope of test
that I want to use"
scalafmt
, not scalafmt::test
. Can you have a quick look at this line and tell me if my understanding is correct, that it's a scoped key? This is what I want to refer to:test in (resolvedScoped.value.scope in scalafmt.key)
does the job. thank you!
Hi everyone, i have a custom resolver in my build.sbt file that's not challenged when resolving dependencies, these are my revolvers
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
,Resolver.sonatypeRepo("releases")
,Resolver.typesafeRepo("releases")
,"spray repo" at "http://repo.spray.io"
,"SpinGo OSS" at "http://spingo-oss.s3.amazonaws.com/repositories/releases"
)
and this is the warning i get :
[info] Resolving com.spingo#op-rabbit-core_2.11;1.2.1 ...
[warn] module not found: com.spingo#op-rabbit-core_2.11;1.2.1
[warn] ==== local: tried
[warn] /root/.ivy2/local/com.spingo/op-rabbit-core_2.11/1.2.1/ivys/ivy.xml
[warn] ==== local-preloaded-ivy: tried
[warn] /root/.sbt/preloaded/com.spingo/op-rabbit-core_2.11/1.2.1/ivys/ivy.xml
[warn] ==== local-preloaded: tried
[warn] file:////root/.sbt/preloaded/com/spingo/op-rabbit-core_2.11/1.2.1/op-rabbit-core_2.11-1.2.1.pom
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/spingo/op-rabbit-core_2.11/1.2.1/op-rabbit-core_2.11-1.2.1.pom
i tried both sbt 13.8 and 13.15 and got the same result, do you guys have any idea about this? thanks for your help