| Number of watchers on Github | 4145 |
| Number of open issues | 667 |
| Average time to close an issue | 8 days |
| Main language | Scala |
| Average time to merge a PR | 2 days |
| Open pull requests | 124+ |
| Closed pull requests | 49+ |
| Last commit | 2 months ago |
| Repo Created | about 11 years ago |
| Repo Last Updated | 2 months ago |
| Size | 23.8 MB |
| Homepage | https://scala-sbt... |
| Organization / Author | sbt |
| Latest Release | v1.3.13 |
| Contributors | 137 |
| Page Updated | 2020-07-20 |
| Do you use sbt? Leave a review! | |
| View open issues (667) | |
| View sbt activity | |
| View on github | |
| Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted) | |
|
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
|
|
sbt is a build tool for Scala, Java, and more.
For general documentation, see https://www.scala-sbt.org/.
This is the 1.x series of sbt. The source code of sbt is split across several GitHub repositories, including this one.
sbt.io module.sbt.librarymanagement module that wraps Ivy.Please read CONTRIBUTING carefully before opening a GitHub Issue.
The short version: try searching or asking on StackOverflow.
See LICENSE.
sbt new on WindowsmissingOk under Coursier #5634/sbt-coursier#212 by @eed3si9n
Resolver.file(...) lm#337 by @eed3si9n
-debug not working in SBT_OPTS lp#322 by @henricook
vals from top-to-bottom within a build file #2232/#5448 by @eed3si9n
.withAllowInsecureProtocol(true) #5593 by @eed3si9n
sbt 1.4.0 adds build server protocol (BSP) support, contributed by Scala Center. Main implementation was done by Adrien Piquerez (@adpi2) based on @eed3si9n's prototype.
When sbt 1.4.0 starts, it will create a file named .bsp/sbt.json containing a machine-readable instruction on how to run sbt -bsp, which is a command line program that uses standard input and output to communicate to sbt server using build server protocol.
Open or import, and select
BSP Project
.bsp directory if anysbt -Dsbt.semanticdb=true in the Terminal tab. Wait till it displays sbt server started
Connect to build server
compile into the sbt session to generate SemanticDB filessbt 1.4.0 / Zinc 1.4.0 virtualizes the file paths tracked during incremental compilation. The benefit for this that the state of incremental compilation can shared across different machines, as long as ThisBuild / rootPaths are enumerated beforehand.
To demonstrate this, we've also added experimental cached compilation feature to sbt. All you need is the following setting:
ThisBuild / pushRemoteCacheTo := Some(MavenCache("local-cache", file("/tmp/remote-cache")))
Then from machine 1, call pushRemoteCache. This will publish the *.class and Zinc Analysis artifacts to the location. Next, from machine 2, call pullRemoteCache.
On start up, sbt 1.4.0 checks for unused settings/tasks. Because most settings are on the intermediary to other settings/tasks, they are included into the linting by default. The notable exceptions are settings used exclusively by a command. To opt-out, you can either append it to Global / excludeLintKeys or set the rank to invisible.
sbt 1.4.0 adds support for conditional task (or Selective task), which is a new kind of task automatically created when Def.task { ... } consists of an if-expression:
bar := {
if (number.value < 0) negAction.value
else if (number.value == 0) zeroAction.value
else posAction.value
}
Unlike the regular (Applicative) task composition, conditional tasks delays the evaluation of then-clause and else-clause as naturally expected of an if-expression. This is already possible with Def.taskDyn { ... }, but unlike dynamic tasks, conditional task works with inspect command. See Selective functor for sbt for more details. #5558 by @eed3si9n
/ without -Dsbt.rootdir=true #5112 by @eed3si9n
StateTransform to accept State => State #5260 by @eatkins
TERM is set to dumb#5278 by @hvesalai
sbt.ForkMain #5315 by @olafurpg
doc #5362 by @eatkins
toTaskable method injection to Initialize[A] for tuple syntax #5439 by @dwijnand
semanticdbVersion to 4.3.7 #5481 by @anilkumarmyla
Tracked.outputChangedW and Tracked.inputChangedW which requires typeclass evidence of JsonWriter[A] instead of JsonFormat[A] #5513 by @bjaglin
State to faciliate sbt server communication #5207 by @eed3si9n
testGrouping #5527 by @frosforever
null #5526 by @3rwww1
Def.promise for long-running tasks to communicate to another task #5552 by @eed3si9n
sbt 1.4.0-M1 was brought to you by 25 contributors. Eugene Yokota (eed3si9n), Ethan Atkins, Adrien Piquerez, Dale Wijnand, Jason Zaugg, Arnout Engelen, Guillaume Martres, Anil Kumar Myla, Brice Jaglin, Steve Waldman, frosforever, Alex Zolotko, Heikki Vesalainen, Stephane Landelle, Jannik Thei, Joo Ferreira, lloydmeta, Alexandre Archambault, Erwan Queffelec, Ismael Juma, Kenji Yoshida (xuwei-k), Olafur Pall Geirsson, Renato Cavalcanti, Vincent PERICART, nigredo-tori. Thanks!
Thanks to everyone who's helped improve sbt and Zinc 1 by using them, reporting bugs, improving our documentation, porting builds, porting plugins, and submitting and reviewing pull requests.
For anyone interested in helping sbt, there are many avenues for you to help, depending on your interest. If you're interested, Contributing, help wanted
, good first issue
are good starting points.
To test sbt server manually, make sure to have an sbt session running, and start sbt -bsp in another termnial. And paste the following in:
{ "jsonrpc": "2.0", "id": 1, "method": "build/initialize", "params": { "displayName": "foo", "version": "1.0.0", "bspVersion": "2.0.0-M5", "rootUri": "file:///tmp/hello", "capabilities": { "languageIds": ["scala"] } } }
Then enter \r\n (type Enter, Ctrl-J for zsh). This should return:
Content-Length: 200
Content-Type: application/vscode-jsonrpc; charset=utf-8
{"jsonrpc":"2.0","id":1,"result":{"displayName":"sbt","version":"1.4.0-SNAPSHOT","bspVersion":"2.0.0-M5","capabilities":{"compileProvider":{"languageIds":["scala"]},"dependencySourcesProvider":true}}}
There was a regression in sbt 1.3.11 around the handling of repositories file. sbt 1.3.12 fixes it. #5583
sbt 1.3.11 updates lm-coursier to 2.0.0-RC6-4, which deprecates $HOME/.coursier/cache directory in favor of OS specific cache locations:
$HOME/Library/Caches/Coursier/v1 for macOS%LOCALAPPDATA%\Coursier\Cache\v1 for Windows$HOME/.cache/coursier/v1 for Linux etcgiter8.version support in project/build.properties #5537 by @drocsid
+ task #5512 / #5497 by @eed3si9n
ServiceLoader handling in layered ClassLoader #5540 by @bjaglin
NullPointerException #5563 by @dwijnand
TypeFunctions.const(()) Strings to reduce memory footprint #5535 by @retronym
allowInsecureProtocol flag in repositories file to opt into using HTTP. Note: This requires sbt + launcher to be updated to the latest. launcher#75 by @eed3si9n