https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html
https://github.com/sbt/sbt-release
https://github.com/sbt/sbt-buildinfo
https://github.com/sbt/sbt/issues/3050
ZipException when switching from sbt 1.0 to sbt 0.13 #3050
https://www.scala-sbt.org/1.0/docs/Running.html
libraryDependencies += groupID % artifactID % revision % configuration
libraryDependencies
is declared in Keys like this:val libraryDependencies = settingKey[Seq[ModuleID]]("Declares managed dependencies.")
https://stackoverflow.com/questions/21389392/how-to-set-system-properties-for-runmain-on-command-linesbt '; set javaOptions += "-Dconfig.resource=../application.conf" ; runMain akka.Main com.my.main.Actor'
javaOptions ++= Seq("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1045")
https://github.com/sbt/sbt-release
val removeSnapshot = true// sys.props.contains("release")https://stackoverflow.com/questions/8732891/can-i-access-my-scala-apps-name-and-version-as-set-in-sbt-from-code
https://github.com/sbt/sbt-buildinfo
Add the following in your
build.sbt
:lazy val root = (project in file(".")).
enablePlugins(BuildInfoPlugin).
settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "hello"
)
/** This object was generated by sbt-buildinfo. */
case object BuildInfo {
/** The value is "helloworld". */
val name: String = "helloworld"
/** The value is "0.1-SNAPSHOT". */
val version: String = "0.1-SNAPSHOT"
/** The value is "2.10.3". */
val scalaVersion: String = "2.10.3"
/** The value is "0.13.2". */
val sbtVersion: String = "0.13.2"
override val toString: String = "name: %s, version: %s, scalaVersion: %s, sbtVersion: %s" format (name, version, scalaVersion, sbtVersion)
}
libraryDependencies ++= Dependencies.scheduler,
https://github.com/sbt/sbt/issues/3050
ZipException when switching from sbt 1.0 to sbt 0.13 #3050
If you're using bash, by default
**
only goes one level deep, you need to enable globstar or use some other techique to recurse into subdirectories like:find . -name target -exec rm -r "{}" \;
brew install sbt@1
Run sbt in your project directory with no arguments:
$ sbt
Running sbt with no command line arguments starts sbt shell. sbt shell has a command prompt (with tab completion and history!).
For example, you could type
compile
at the sbt shell:> compile
package
History Commands
sbt shell remembers history, even if you exit sbt and restart it. The simplest way to access history is with the up arrow key. The following commands are also supported:
! Show history command help.
!! Execute the previous command again.
!: Show all previous commands.
!:n Show the last n commands.
!n Execute the command with index n, as shown by the !: command.
!-n Execute the nth command before this one.
!string Execute the most recent command starting with 'string.'
!?string Execute the most recent command containing 'string.'