sbt, the interactive build tool
Go to file
Eugene Yokota 33a01f3ceb Unified slash syntax
Fixes sbt/sbt#1812

This adds unified slash syntax for both sbt shell and the build.sbt DSL.
Instead of the current `<project-id>/config:intask::key`,
this adds `<project-id>/<config-ident>/intask/key` where <config-ident> is the Scala identifier notation for the configurations like `Compile` and `Test`.

This also adds a series of implicits called `SlashSyntax` that adds `/` operators to project refererences, configuration, and keys such that the same syntax works in build.sbt.

These examples work for both from the shell and in build.sbt.

    Global / cancelable
    ThisBuild / scalaVersion
    Test / test
    root / Compile / compile / scalacOptions
    ProjectRef(uri("file:/xxx/helloworld/"),"root")/Compile/scalacOptions
    Zero / Zero / name

The inspect command now outputs something that can be copy-pasted:

    > inspect compile
    [info] Task: sbt.inc.Analysis
    [info] Description:
    [info] 	Compiles sources.
    [info] Provided by:
    [info] 	ProjectRef(uri("file:/xxx/helloworld/"),"root")/Compile/compile
    [info] Defined at:
    [info] 	(sbt.Defaults) Defaults.scala:326
    [info] Dependencies:
    [info] 	Compile/manipulateBytecode
    [info] 	Compile/incCompileSetup
    [info] Reverse dependencies:
    [info] 	Compile/printWarnings
    [info] 	Compile/products
    [info] 	Compile/discoveredSbtPlugins
    [info] 	Compile/discoveredMainClasses
    [info] Delegates:
    [info] 	Compile/compile
    [info] 	compile
    [info] 	ThisBuild/Compile/compile
    [info] 	ThisBuild/compile
    [info] 	Zero/Compile/compile
    [info] 	Global/compile
    [info] Related:
    [info] 	Test/compile
2017-09-28 01:01:43 -04:00
core-macros/src/main/scala/sbt/internal/util/appmacro Scalafmt 1.2.0 2017-08-14 15:47:52 +01:00
internal Unified slash syntax 2017-09-28 01:01:43 -04:00
launch Add three slashes (u3) for file URI 2017-04-12 03:34:11 -04:00
licenses move remaining pieces of sbt subproject to sbt_pending and fix notices 2010-09-21 21:55:50 -04:00
main Unified slash syntax 2017-09-28 01:01:43 -04:00
main-actions/src Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
main-command/src/main Reference token file using URI and full file path 2017-09-25 01:35:49 -04:00
main-settings/src Unified slash syntax 2017-09-28 01:01:43 -04:00
notes Unified slash syntax 2017-09-28 01:01:43 -04:00
project implement tokenfile authentication 2017-09-21 23:05:48 -04:00
protocol/src/main Reference token file using URI and full file path 2017-09-25 01:35:49 -04:00
run Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
sbt/src Unified slash syntax 2017-09-28 01:01:43 -04:00
scripted Set deprecation version to 1.1.0 2017-09-25 13:56:42 -04:00
src/main/conscript launchconfig 2017-08-10 01:26:58 -04:00
tasks Apply Scalafmt formatting 2017-04-21 04:48:31 -04:00
tasks-standard Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
testing Fix unused imports warnings 2017-09-15 16:35:08 +01:00
.gitattributes Added .gitattributes file. 2013-04-25 00:06:51 +08:00
.gitignore Reorganize test structure for `mainSettings` 2017-05-24 11:27:04 +02:00
.java-version Configure JVM 1.8 in .java-version 2016-10-07 08:48:23 -05:00
.scalafmt.conf Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
.travis.yml implement server handshake test 2017-09-16 22:29:58 -04:00
CONTRIBUTING.md s/Typesafe subscriptions/Lightbend subscriptions 2017-07-22 07:14:42 +09:00
ISSUE_TEMPLATE.md Add prompt for sbt version in the issue template 2017-06-04 11:47:21 +02:00
LICENSE Update CONTRIBUTING.md 2014-04-14 12:16:06 -04:00
NOTICE Update CONTRIBUTING.md 2014-04-14 12:16:06 -04:00
PULL_REQUEST_TEMPLATE.md Add "Clean history" to contributing with links 2016-02-19 13:21:11 +00:00
README.md Merge branch '1.0.x' into add-gitter-badge 2017-06-03 06:11:33 +02:00
build.sbt Unified slash syntax 2017-09-28 01:01:43 -04:00
reset.sh 1.0.3-SNAPSHOT 2017-09-16 15:52:58 -04:00
sbt-allsources.sh Bump underlying modules to latest 2017-03-23 12:41:24 -04:00
server.md Don't wrap InputStream for Windows 2017-07-22 03:34:10 -04:00

README.md

Gitter Chat

sbt

sbt is a build tool for Scala, Java, and more.

For general documentation, see http://www.scala-sbt.org/.

sbt 1.0.x

This is the 1.0.x series of sbt. The source code of sbt is split across several Github repositories, including this one.

  • sbt/io hosts sbt.io module.
  • sbt/util hosts a collection of internally used modules.
  • sbt/librarymanagement hosts sbt.librarymanagement module that wraps Ivy.
  • sbt/zinc hosts Zinc, an incremental compiler for Scala.
  • sbt/sbt, this repository hosts modules that implements the build tool.
  • Setup: Describes getting started with the latest binary release.
  • FAQ: Explains how to get help and more.
  • sbt/sbt-zero-seven: hosts sbt 0.7.7 and earlier versions

Issues and Pull Requests

Please read CONTRIBUTING carefully before opening a GitHub Issue.

The short version: try searching or asking on StackOverflow.

license

See LICENSE.