Merge pull request #3407 from sbt/1.0.0

Merge the 1.0.0 branch into 1.x
This commit is contained in:
eugene yokota 2017-08-08 12:19:49 -04:00 committed by GitHub
commit 6ea9dab99e
34 changed files with 624 additions and 604 deletions

View File

@ -16,8 +16,9 @@ matrix:
env:
matrix:
- SBT_CMD=";test:compile;scalafmt::test;test:scalafmt::test;mainSettingsProj/test;safeUnitTests;otherUnitTests"
# - SBT_CMD="mimaReportBinaryIssues"
# drop scalafmt on the 1.0.0 branch to dogfood 1.0.0-RC2 before there is a sbt 1.0 of new-sbt-scalafnt
# - SBT_CMD=";mimaReportBinaryIssues;test:compile;scalafmt::test;test:scalafmt::test;mainSettingsProj/test;safeUnitTests;otherUnitTests"
- SBT_CMD=";mimaReportBinaryIssues;test:compile;mainSettingsProj/test;safeUnitTests;otherUnitTests"
- SBT_CMD="scripted actions/*"
- SBT_CMD="scripted apiinfo/* compiler-project/* ivy-deps-management/*"
- SBT_CMD="scripted dependency-management/*1of4"

View File

@ -32,9 +32,9 @@ def buildLevelSettings: Seq[Setting[_]] =
homepage := Some(url("https://github.com/sbt/sbt")),
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")),
resolvers += Resolver.mavenLocal,
scalafmtOnCompile := true,
// scalafmtOnCompile := true,
// scalafmtVersion 1.0.0-RC3 has regression
scalafmtVersion := "0.6.8"
// scalafmtVersion := "0.6.8"
))
def commonSettings: Seq[Setting[_]] =
@ -51,13 +51,6 @@ def commonSettings: Seq[Setting[_]] =
bintrayPackage := (bintrayPackage in ThisBuild).value,
bintrayRepository := (bintrayRepository in ThisBuild).value,
publishArtifact in Test := false,
/*
mimaPreviousArtifacts := Set.empty, // Set(organization.value % moduleName.value % "1.0.0"),
mimaBinaryIssueFilters ++= {
import com.typesafe.tools.mima.core._, ProblemFilters._
Seq()
},
*/
fork in compile := true,
fork in run := true
) flatMap (_.settings)
@ -72,10 +65,16 @@ def baseSettings: Seq[Setting[_]] =
def testedBaseSettings: Seq[Setting[_]] =
baseSettings ++ testDependencies
val mimaSettings = Def settings (
mimaPreviousArtifacts := Set(organization.value % moduleName.value % "1.0.0-RC3"
cross (if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled)
)
)
lazy val sbtRoot: Project = (project in file("."))
.enablePlugins(ScriptedPlugin) // , SiteScaladocPlugin, GhpagesPlugin)
.configs(Sxr.sxrConf)
.aggregateSeq(nonRoots)
.configs(Sxr.SxrConf)
.aggregate(nonRoots: _*)
.settings(
buildLevelSettings,
minimalSettings,
@ -117,6 +116,7 @@ lazy val bundledLauncherProj =
description := "sbt application launcher",
autoScalaLibrary := false,
crossPaths := false,
// mimaSettings, // TODO: Configure MiMa, deal with Proguard
publish := Release.deployLauncher.value,
publishLauncher := Release.deployLauncher.value,
packageBin in Compile := sbtLaunchJar.value
@ -129,7 +129,8 @@ val collectionProj = (project in file("internal") / "util-collection")
testedBaseSettings,
Util.keywordsSettings,
name := "Collections",
libraryDependencies ++= Seq(sjsonNewScalaJson.value)
libraryDependencies ++= Seq(sjsonNewScalaJson.value),
mimaSettings,
)
.configure(addSbtUtilPosition)
@ -139,7 +140,8 @@ val completeProj = (project in file("internal") / "util-complete")
.settings(
testedBaseSettings,
name := "Completion",
libraryDependencies += jline
libraryDependencies += jline,
mimaSettings,
)
.configure(addSbtIO, addSbtUtilControl)
@ -148,7 +150,8 @@ val logicProj = (project in file("internal") / "util-logic")
.dependsOn(collectionProj)
.settings(
testedBaseSettings,
name := "Logic"
name := "Logic",
mimaSettings,
)
.configure(addSbtUtilRelation)
@ -165,7 +168,8 @@ lazy val testingProj = (project in file("testing"))
managedSourceDirectories in Compile +=
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats,
mimaSettings,
)
.configure(addSbtIO, addSbtCompilerClasspath, addSbtUtilLogging)
@ -177,7 +181,8 @@ lazy val testAgentProj = (project in file("testing") / "agent")
crossPaths := false,
autoScalaLibrary := false,
name := "Test Agent",
libraryDependencies += testInterface
libraryDependencies += testInterface,
mimaSettings,
)
// Basic task engine
@ -185,7 +190,8 @@ lazy val taskProj = (project in file("tasks"))
.dependsOn(collectionProj)
.settings(
testedBaseSettings,
name := "Tasks"
name := "Tasks",
mimaSettings,
)
.configure(addSbtUtilControl)
@ -196,19 +202,22 @@ lazy val stdTaskProj = (project in file("tasks-standard"))
.settings(
testedBaseSettings,
name := "Task System",
testExclusive
testExclusive,
mimaSettings,
)
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilCache)
// Embedded Scala code runner
lazy val runProj = (project in file("run"))
.enablePlugins(ContrabandPlugin)
.dependsOn(collectionProj)
.settings(
testedBaseSettings,
name := "Run",
managedSourceDirectories in Compile +=
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala"
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
mimaSettings,
)
.configure(addSbtIO, addSbtUtilLogging, addSbtCompilerClasspath)
@ -217,7 +226,8 @@ lazy val scriptedSbtProj = (project in scriptedPath / "sbt")
.settings(
baseSettings,
name := "Scripted sbt",
libraryDependencies ++= Seq(launcherInterface % "provided")
libraryDependencies ++= Seq(launcherInterface % "provided"),
mimaSettings,
)
.configure(addSbtIO, addSbtUtilLogging, addSbtCompilerInterface, addSbtUtilScripted)
@ -225,7 +235,8 @@ lazy val scriptedPluginProj = (project in scriptedPath / "plugin")
.dependsOn(sbtProj)
.settings(
baseSettings,
name := "Scripted Plugin"
name := "Scripted Plugin",
mimaSettings,
)
.configure(addSbtCompilerClasspath)
@ -235,7 +246,8 @@ lazy val actionsProj = (project in file("main-actions"))
.settings(
testedBaseSettings,
name := "Actions",
libraryDependencies += sjsonNewScalaJson.value
libraryDependencies += sjsonNewScalaJson.value,
mimaSettings,
)
.configure(
addSbtIO,
@ -259,7 +271,8 @@ lazy val protocolProj = (project in file("protocol"))
managedSourceDirectories in Compile +=
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats,
mimaSettings,
)
.configure(addSbtUtilLogging)
@ -274,7 +287,8 @@ lazy val commandProj = (project in file("main-command"))
managedSourceDirectories in Compile +=
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats,
mimaSettings,
)
.configure(
addSbtIO,
@ -291,7 +305,8 @@ lazy val coreMacrosProj = (project in file("core-macros"))
.settings(
commonSettings,
name := "Core Macros",
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value
libraryDependencies += "org.scala-lang" % "scala-compiler" % scalaVersion.value,
mimaSettings,
)
/* Write all the compile-time dependencies of the spores macro to a file,
@ -320,7 +335,8 @@ lazy val mainSettingsProj = (project in file("main-settings"))
.settings(
testedBaseSettings,
name := "Main Settings",
resourceGenerators in Compile += generateToolboxClasspath.taskValue
resourceGenerators in Compile += generateToolboxClasspath.taskValue,
mimaSettings,
)
.configure(
addSbtIO,
@ -335,14 +351,15 @@ lazy val mainSettingsProj = (project in file("main-settings"))
// The main integration project for sbt. It brings all of the projects together, configures them, and provides for overriding conventions.
lazy val mainProj = (project in file("main"))
.enablePlugins(ContrabandPlugin)
.dependsOn(logicProj, actionsProj, mainSettingsProj, runProj, commandProj)
.dependsOn(logicProj, actionsProj, mainSettingsProj, runProj, commandProj, collectionProj)
.settings(
testedBaseSettings,
name := "Main",
libraryDependencies ++= scalaXml.value ++ Seq(launcherInterface),
libraryDependencies ++= scalaXml.value ++ Seq(launcherInterface) ++ log4jDependencies,
managedSourceDirectories in Compile +=
baseDirectory.value / "src" / "main" / "contraband-scala",
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala"
sourceManaged in (Compile, generateContrabands) := baseDirectory.value / "src" / "main" / "contraband-scala",
mimaSettings,
)
.configure(
addSbtIO,
@ -362,7 +379,8 @@ lazy val sbtProj = (project in file("sbt"))
name := "sbt",
normalizedName := "sbt",
crossScalaVersions := Seq(baseScalaVersion),
crossPaths := false
crossPaths := false,
mimaSettings,
)
.configure(addSbtCompilerBridge)

View File

@ -82,6 +82,10 @@ object AttributeKey {
rank: Int): AttributeKey[T] =
make(name, Some(description), extend, rank)
private[sbt] def copyWithRank[T](a: AttributeKey[T], rank: Int): AttributeKey[T] =
make(a.label, a.description, a.extend, rank)(a.manifest, a.optJsonWriter)
private[this] def make[T](
name: String,
description0: Option[String],

View File

@ -37,4 +37,18 @@ object Util {
Camel.replaceAllIn(s, m => m.group(1) + "-" + m.group(2).toLowerCase(Locale.ENGLISH))
def quoteIfKeyword(s: String): String = if (ScalaKeywords.values(s)) '`' + s + '`' else s
lazy val isWindows: Boolean =
System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("windows")
lazy val isCygwin: Boolean = {
val os = Option(System.getenv("OSTYPE"))
os match {
case Some(x) => x.toLowerCase(Locale.ENGLISH).contains("cygwin")
case _ => false
}
}
lazy val isNonCygwinWindows: Boolean = isWindows && !isCygwin
lazy val isCygwinWindows: Boolean = isWindows && isCygwin
}

View File

@ -14,12 +14,22 @@ abstract class JLine extends LineReader {
protected[this] def handleCONT: Boolean
protected[this] def reader: ConsoleReader
protected[this] def injectThreadSleep: Boolean
protected[this] val in: InputStream = JLine.makeInputStream(injectThreadSleep)
def readLine(prompt: String, mask: Option[Char] = None) = JLine.withJLine {
unsynchronizedReadLine(prompt, mask)
protected[this] lazy val in: InputStream = {
// On Windows InputStream#available doesn't seem to return positive number.
JLine.makeInputStream(injectThreadSleep && !Util.isNonCygwinWindows)
}
def readLine(prompt: String, mask: Option[Char] = None) =
try {
JLine.withJLine {
unsynchronizedReadLine(prompt, mask)
}
} catch {
case _: InterruptedException =>
// println("readLine: InterruptedException")
Option("")
}
private[this] def unsynchronizedReadLine(prompt: String, mask: Option[Char]): Option[String] =
readLineWithHistory(prompt, mask) map { x =>
x.trim
@ -42,13 +52,9 @@ abstract class JLine extends LineReader {
private[this] def readLineDirectRaw(prompt: String, mask: Option[Char]): Option[String] = {
val newprompt = handleMultilinePrompt(prompt)
try {
mask match {
case Some(m) => Option(reader.readLine(newprompt, m))
case None => Option(reader.readLine(newprompt))
}
} catch {
case e: InterruptedException => Option("")
mask match {
case Some(m) => Option(reader.readLine(newprompt, m))
case None => Option(reader.readLine(newprompt))
}
}

View File

@ -48,7 +48,9 @@ private[sbt] final class ConsoleChannel(val name: String) extends CommandChannel
case Some(src) if src.channelName != name =>
askUserThread match {
case Some(x) =>
shutdown()
// keep listening while network-origin command is running
// make sure to test Windows and Cygwin, if you uncomment
// shutdown()
case _ =>
}
case _ =>

View File

@ -86,6 +86,9 @@ sealed abstract class SettingKey[T]
import TupleSyntax._
set((this, other)(f), source)
}
final def withRank(rank: Int): SettingKey[T] =
SettingKey(AttributeKey.copyWithRank(key, rank))
}
/**
@ -149,6 +152,9 @@ sealed abstract class TaskKey[T]
import TupleSyntax._
set((this, other)((a, b) => (a, b) map f.tupled), source)
}
final def withRank(rank: Int): TaskKey[T] =
TaskKey(AttributeKey.copyWithRank(key, rank))
}
/**
@ -176,6 +182,9 @@ sealed trait InputKey[T]
final def transform(f: T => T, source: SourcePosition): Setting[InputTask[T]] =
set(scopedKey(_ mapTask { _ map f }), source)
final def withRank(rank: Int): InputKey[T] =
InputKey(AttributeKey.copyWithRank(key, rank))
}
/** Methods and types related to constructing settings, including keys, scopes, and initializations. */

View File

@ -1,5 +1,6 @@
package sbt.std
import sbt.SettingKey
import sbt.internal.util.ConsoleAppender
import sbt.internal.util.appmacro.{ Convert, Converted, LinterDSL }
@ -62,10 +63,12 @@ abstract class BaseTaskLinterDSL extends LinterDSL {
case ap @ Apply(TypeApply(Select(_, nme), tpe :: Nil), qual :: Nil) =>
val shouldIgnore = uncheckedWrappers.contains(ap)
val wrapperName = nme.decodedName.toString
if (!shouldIgnore && isTask(wrapperName, tpe.tpe, qual)) {
val qualName =
if (qual.symbol != null) qual.symbol.name.decodedName.toString
else ap.pos.lineContent
val (qualName, isSettingKey) =
Option(qual.symbol)
.map(sym => (sym.name.decodedName.toString, sym.info <:< typeOf[SettingKey[_]]))
.getOrElse((ap.pos.lineContent, false))
if (!isSettingKey && !shouldIgnore && isTask(wrapperName, tpe.tpe, qual)) {
if (insideIf && !isDynamicTask) {
// Error on the use of value inside the if of a regular task (dyn task is ok)
ctx.error(ap.pos, TaskLinterDSLFeedback.useOfValueInsideIfExpression(qualName))

View File

@ -150,4 +150,25 @@ class TaskPosSpec {
avoidDCE
}
}
locally {
import sbt._
import sbt.Def._
val foo = settingKey[String]("")
val condition = true
val baz = Def.task[String] {
// settings can be evaluated in a condition
if (condition) foo.value
else "..."
}
}
locally {
import sbt._
import sbt.Def._
val foo = settingKey[String]("")
val baz = Def.task[Seq[String]] {
(1 to 10).map(_ => foo.value)
}
}
}

View File

@ -1,6 +1,6 @@
package sbt
import sbt.internal.util.SimpleReader
import sbt.internal.util.{ JLine, SimpleReader }
trait CommandLineUIService extends InteractionService {
override def readLine(prompt: String, mask: Boolean): Option[String] = {
@ -19,6 +19,10 @@ trait CommandLineUIService extends InteractionService {
case _ => false
}
}
override def terminalWidth: Int = JLine.usingTerminal(_.getWidth)
override def terminalHeight: Int = JLine.usingTerminal(_.getHeight)
}
object CommandLineUIService extends CommandLineUIService

View File

@ -71,7 +71,7 @@ import scala.concurrent.duration.FiniteDuration
import scala.util.control.NonFatal
import scala.xml.NodeSeq
import Scope.{ fillTaskAxis, GlobalScope, ThisScope }
import sjsonnew.{ IsoLList, JsonFormat, LList, LNil }, LList.:*:
import sjsonnew.{ IsoLList, JsonFormat, LList, LNil, :*: }
import sjsonnew.shaded.scalajson.ast.unsafe.JValue
import std.TaskExtra._
import testing.{ Framework, Runner, AnnotatedFingerprint, SubclassFingerprint }
@ -374,6 +374,7 @@ object Defaults extends BuildCommon {
}
)
// This is included into JvmPlugin.projectSettings
def compileBase = inTask(console)(compilersSetting :: Nil) ++ compileBaseGlobal ++ Seq(
incOptions := incOptions.value
.withClassfileManagerType(
@ -381,15 +382,7 @@ object Defaults extends BuildCommon {
.of(crossTarget.value / "classes.bak", sbt.util.Logger.Null): ClassFileManagerType).toOptional
),
scalaInstance := scalaInstanceTask.value,
crossVersion := (if (crossPaths.value) CrossVersion.binary else Disabled()),
scalaVersion := {
val scalaV = scalaVersion.value
val sv = (sbtBinaryVersion in pluginCrossBuild).value
val isPlugin = sbtPlugin.value
if (isPlugin) {
scalaVersionFromSbtBinaryVersion(sv)
} else scalaV
},
crossVersion := (if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled),
sbtBinaryVersion in pluginCrossBuild := binarySbtVersion(
(sbtVersion in pluginCrossBuild).value),
crossSbtVersions := Vector((sbtVersion in pluginCrossBuild).value),
@ -426,14 +419,6 @@ object Defaults extends BuildCommon {
derive(scalaBinaryVersion := binaryScalaVersion(scalaVersion.value))
))
private[sbt] def scalaVersionFromSbtBinaryVersion(sv: String): String =
VersionNumber(sv) match {
case VersionNumber(Seq(0, 12, _*), _, _) => "2.9.2"
case VersionNumber(Seq(0, 13, _*), _, _) => "2.10.6"
case VersionNumber(Seq(1, _, _*), _, _) => "2.12.2"
case _ => sys.error(s"Unsupported sbt binary version: $sv")
}
def makeCrossSources(scalaSrcDir: File,
javaSrcDir: File,
sv: String,
@ -2173,16 +2158,26 @@ object Classpaths {
classifiers.toVector
)
}
def deliverTask(config: TaskKey[PublishConfiguration]): Initialize[Task[File]] =
Def.task {
val _ = update.value
IvyActions.deliver(ivyModule.value, config.value, streams.value.log)
}
def publishTask(config: TaskKey[PublishConfiguration],
deliverKey: TaskKey[_]): Initialize[Task[Unit]] =
Def.task {
IvyActions.publish(ivyModule.value, config.value, streams.value.log)
Def.taskDyn {
val s = streams.value
val skp = (skip in publish).value
val ref = thisProjectRef.value
if (skp) Def.task { s.log.debug(s"Skipping publish* for ${ref.project}") }
else Def.task {
val cfg = config.value
IvyActions.publish(ivyModule.value, config.value, s.log)
}
} tag (Tags.Publish, Tags.Network)
val moduleIdJsonKeyFormat: sjsonnew.JsonKeyFormat[ModuleID] =
new sjsonnew.JsonKeyFormat[ModuleID] {
import sjsonnew.support.scalajson.unsafe._
@ -2300,16 +2295,18 @@ object Classpaths {
}.value
LibraryManagement.cachedUpdate(
// LM API
lm = dependencyResolution.value,
// Ivy-free ModuleDescriptor
module = ivyModule.value,
s.cacheStoreFactory.sub(updateCacheName.value),
Reference.display(thisProjectRef.value),
ivyModule.value,
updateConf,
substituteScalaFiles(scalaOrganization.value, _)(providedScalaJars),
skip = (skip in update).value,
force = shouldForce,
depsUpdated = transitiveUpdate.value.exists(!_.stats.cached),
uwConfig = (unresolvedWarningConfiguration in update).value,
depDir = Some(dependencyCacheDirectory.value),
ewo = evictionOptions,
mavenStyle = publishMavenStyle.value,
compatWarning = compatibilityWarningOptions.value,

View File

@ -13,5 +13,9 @@ abstract class InteractionService {
/** Ask the user to confirm something (yes or no) before continuing. */
def confirm(msg: String): Boolean
def terminalWidth: Int
def terminalHeight: Int
// TODO - Ask for input with autocomplete?
}

View File

@ -90,38 +90,38 @@ object Keys {
val TraceValues = "-1 to disable, 0 for up to the first sbt frame, or a positive number to set the maximum number of frames shown."
// logging
val logLevel = SettingKey[Level.Value]("log-level", "The amount of logging sent to the screen.", ASetting)
val persistLogLevel = SettingKey[Level.Value]("persist-log-level", "The amount of logging sent to a file for persistence.", CSetting)
val traceLevel = SettingKey[Int]("trace-level", "The amount of a stack trace displayed. " + TraceValues, ASetting)
val persistTraceLevel = SettingKey[Int]("persist-trace-level", "The amount of stack trace persisted.", CSetting)
val showSuccess = SettingKey[Boolean]("show-success", "If true, displays a success message after running a command successfully.", CSetting)
val showTiming = SettingKey[Boolean]("show-timing", "If true, the command success message includes the completion time.", CSetting)
val timingFormat = SettingKey[java.text.DateFormat]("timing-format", "The format used for displaying the completion time.", CSetting)
val extraLoggers = SettingKey[ScopedKey[_] => Seq[Appender]]("extra-loggers", "A function that provides additional loggers for a given setting.", DSetting)
val logManager = SettingKey[LogManager]("log-manager", "The log manager, which creates Loggers for different contexts.", DSetting)
val logBuffered = SettingKey[Boolean]("log-buffered", "True if logging should be buffered until work completes.", CSetting)
val sLog = SettingKey[Logger]("setting-logger", "Logger usable by settings during project loading.", CSetting)
val logLevel = settingKey[Level.Value]("The amount of logging sent to the screen.").withRank(ASetting)
val persistLogLevel = settingKey[Level.Value]("The amount of logging sent to a file for persistence.").withRank(CSetting)
val traceLevel = settingKey[Int]("The amount of a stack trace displayed. " + TraceValues).withRank(ASetting)
val persistTraceLevel = settingKey[Int]("The amount of stack trace persisted.").withRank(CSetting)
val showSuccess = settingKey[Boolean]("If true, displays a success message after running a command successfully.").withRank(CSetting)
val showTiming = settingKey[Boolean]("If true, the command success message includes the completion time.").withRank(CSetting)
val timingFormat = settingKey[java.text.DateFormat]("The format used for displaying the completion time.").withRank(CSetting)
val extraLoggers = settingKey[ScopedKey[_] => Seq[Appender]]("A function that provides additional loggers for a given setting.").withRank(DSetting)
val logManager = settingKey[LogManager]("The log manager, which creates Loggers for different contexts.").withRank(DSetting)
val logBuffered = settingKey[Boolean]("True if logging should be buffered until work completes.").withRank(CSetting)
val sLog = settingKey[Logger]("Logger usable by settings during project loading.").withRank(CSetting)
// Project keys
val autoGeneratedProject = SettingKey[Boolean]("autogeneratedProject", "If it exists, represents that the project (and name) were automatically created, rather than user specified.", DSetting)
val projectCommand = AttributeKey[Boolean]("project-command", "Marks Commands that were registered for the current Project.", Invisible)
val sessionSettings = AttributeKey[SessionSettings]("session-settings", "Tracks current build, project, and setting modifications.", DSetting)
val stateBuildStructure = AttributeKey[BuildStructure]("build-structure", "Data structure containing all information about the build definition.", BSetting)
val buildStructure = TaskKey[BuildStructure]("build-structure", "Provides access to the build structure, settings, and streams manager.", DTask)
val loadedBuild = SettingKey[LoadedBuild]("loaded-build", "Provides access to the loaded project structure. This is the information available before settings are evaluated.", DSetting)
val buildDependencies = SettingKey[BuildDependencies]("build-dependencies", "Definitive source of inter-project dependencies for compilation and dependency management.\n\tThis is populated by default by the dependencies declared on Project instances, but may be modified.\n\tThe main restriction is that new builds may not be introduced.", DSetting)
val appConfiguration = SettingKey[xsbti.AppConfiguration]("app-configuration", "Provides access to the launched sbt configuration, including the ScalaProvider, Launcher, and GlobalLock.", DSetting)
val thisProject = SettingKey[ResolvedProject]("this-project", "Provides the current project for the referencing scope.", CSetting)
val thisProjectRef = SettingKey[ProjectRef]("this-project-ref", "Provides a fully-resolved reference to the current project for the referencing scope.", CSetting)
val configuration = SettingKey[Configuration]("configuration", "Provides the current configuration of the referencing scope.", CSetting)
val commands = SettingKey[Seq[Command]]("commands", "Defines commands to be registered when this project or build is the current selected one.", CSetting)
val initialize = SettingKey[Unit]("initialize", "A convenience setting for performing side-effects during initialization.", BSetting)
val onLoad = SettingKey[State => State]("on-load", "Transformation to apply to the build state when the build is loaded.", DSetting)
val onUnload = SettingKey[State => State]("on-unload", "Transformation to apply to the build state when the build is unloaded.", DSetting)
val onLoadMessage = SettingKey[String]("on-load-message", "Message to display when the project is loaded.", DSetting)
val transformState = AttributeKey[State => State]("transform-state", "State transformation to apply after tasks run.", DSetting)
val autoGeneratedProject = settingKey[Boolean]("If it exists, represents that the project (and name) were automatically created, rather than user specified.").withRank(DSetting)
val projectCommand = AttributeKey[Boolean]("projectCommand", "Marks Commands that were registered for the current Project.", Invisible)
val sessionSettings = AttributeKey[SessionSettings]("sessionSettings", "Tracks current build, project, and setting modifications.", DSetting)
val stateBuildStructure = AttributeKey[BuildStructure]("stateBuildStructure", "Data structure containing all information about the build definition.", BSetting)
val buildStructure = taskKey[BuildStructure]("Provides access to the build structure, settings, and streams manager.").withRank(DTask)
val loadedBuild = settingKey[LoadedBuild]("Provides access to the loaded project structure. This is the information available before settings are evaluated.").withRank(DSetting)
val buildDependencies = settingKey[BuildDependencies]("Definitive source of inter-project dependencies for compilation and dependency management.\n\tThis is populated by default by the dependencies declared on Project instances, but may be modified.\n\tThe main restriction is that new builds may not be introduced.").withRank(DSetting)
val appConfiguration = settingKey[xsbti.AppConfiguration]("Provides access to the launched sbt configuration, including the ScalaProvider, Launcher, and GlobalLock.").withRank(DSetting)
val thisProject = settingKey[ResolvedProject]("Provides the current project for the referencing scope.").withRank(CSetting)
val thisProjectRef = settingKey[ProjectRef]("Provides a fully-resolved reference to the current project for the referencing scope.").withRank(CSetting)
val configuration = settingKey[Configuration]("Provides the current configuration of the referencing scope.").withRank(CSetting)
val commands = settingKey[Seq[Command]]("Defines commands to be registered when this project or build is the current selected one.").withRank(CSetting)
val initialize = settingKey[Unit]("A convenience setting for performing side-effects during initialization.").withRank(BSetting)
val onLoad = settingKey[State => State]("Transformation to apply to the build state when the build is loaded.").withRank(DSetting)
val onUnload = settingKey[State => State]("Transformation to apply to the build state when the build is unloaded.").withRank(DSetting)
val onLoadMessage = settingKey[String]("Message to display when the project is loaded.").withRank(DSetting)
val transformState = AttributeKey[State => State]("transformState", "State transformation to apply after tasks run.", DSetting)
val onComplete = SettingKey[() => Unit]("on-complete", "Hook to run when task evaluation completes. The type of this setting is subject to change, pending the resolution of SI-2915.", DSetting)
val onComplete = settingKey[() => Unit]("Hook to run when task evaluation completes. The type of this setting is subject to change, pending the resolution of SI-2915.").withRank(DSetting)
// Command keys
val historyPath = SettingKey(BasicKeys.historyPath)
@ -129,137 +129,137 @@ object Keys {
val serverPort = SettingKey(BasicKeys.serverPort)
val analysis = AttributeKey[CompileAnalysis]("analysis", "Analysis of compilation, including dependencies and generated outputs.", DSetting)
val watch = SettingKey(BasicKeys.watch)
val suppressSbtShellNotification = SettingKey[Boolean]("suppressSbtShellNotification", """True to suppress the "Executing in batch mode.." message.""", CSetting)
val pollInterval = SettingKey[FiniteDuration]("poll-interval", "Interval between checks for modified sources by the continuous execution command.", BMinusSetting)
val watchService = SettingKey[() => WatchService]("watch-service", "Service to use to monitor file system changes.", BMinusSetting)
val watchSources = TaskKey[Seq[Source]]("watch-sources", "Defines the sources in this project for continuous execution to watch for changes.", BMinusSetting)
val watchTransitiveSources = TaskKey[Seq[Source]]("watch-transitive-sources", "Defines the sources in all projects for continuous execution to watch.", CSetting)
val watchingMessage = SettingKey[WatchState => String]("watching-message", "The message to show when triggered execution waits for sources to change.", DSetting)
val triggeredMessage = SettingKey[WatchState => String]("triggered-message", "The message to show before triggered execution executes an action after sources change.", DSetting)
val suppressSbtShellNotification = settingKey[Boolean]("""True to suppress the "Executing in batch mode.." message.""").withRank(CSetting)
val pollInterval = settingKey[FiniteDuration]("Interval between checks for modified sources by the continuous execution command.").withRank(BMinusSetting)
val watchService = settingKey[() => WatchService]("Service to use to monitor file system changes.").withRank(BMinusSetting)
val watchSources = taskKey[Seq[Source]]("Defines the sources in this project for continuous execution to watch for changes.").withRank(BMinusSetting)
val watchTransitiveSources = taskKey[Seq[Source]]("Defines the sources in all projects for continuous execution to watch.").withRank(CSetting)
val watchingMessage = settingKey[WatchState => String]("The message to show when triggered execution waits for sources to change.").withRank(DSetting)
val triggeredMessage = settingKey[WatchState => String]("The message to show before triggered execution executes an action after sources change.").withRank(DSetting)
// Path Keys
val baseDirectory = SettingKey[File]("base-directory", "The base directory. Depending on the scope, this is the base directory for the build, project, configuration, or task.", AMinusSetting)
val target = SettingKey[File]("target", "Main directory for files generated by the build.", AMinusSetting)
val crossTarget = SettingKey[File]("cross-target", "Main directory for files generated by the build that are cross-built.", BSetting)
val baseDirectory = settingKey[File]("The base directory. Depending on the scope, this is the base directory for the build, project, configuration, or task.").withRank(AMinusSetting)
val target = settingKey[File]("Main directory for files generated by the build.").withRank(AMinusSetting)
val crossTarget = settingKey[File]("Main directory for files generated by the build that are cross-built.").withRank(BSetting)
// Source paths
val sourceDirectory = SettingKey[File]("source-directory", "Default directory containing sources.", AMinusSetting)
val sourceManaged = SettingKey[File]("source-managed", "Default directory for sources generated by the build.", BPlusSetting)
val scalaSource = SettingKey[File]("scala-source", "Default Scala source directory.", ASetting)
val javaSource = SettingKey[File]("java-source", "Default Java source directory.", ASetting)
val sourceDirectories = SettingKey[Seq[File]]("source-directories", "List of all source directories, both managed and unmanaged.", AMinusSetting)
val unmanagedSourceDirectories = SettingKey[Seq[File]]("unmanaged-source-directories", "Unmanaged source directories, which contain manually created sources.", ASetting)
val unmanagedSources = TaskKey[Seq[File]]("unmanaged-sources", "Unmanaged sources, which are manually created.", BPlusTask)
val managedSourceDirectories = SettingKey[Seq[File]]("managed-source-directories", "Managed source directories, which contain sources generated by the build.", BSetting)
val managedSources = TaskKey[Seq[File]]("managed-sources", "Sources generated by the build.", BTask)
val sources = TaskKey[Seq[File]]("sources", "All sources, both managed and unmanaged.", BTask)
val sourcesInBase = SettingKey[Boolean]("sources-in-base", "If true, sources from the project's base directory are included as main sources.")
val sourceDirectory = settingKey[File]("Default directory containing sources.").withRank(AMinusSetting)
val sourceManaged = settingKey[File]("Default directory for sources generated by the build.").withRank(BPlusSetting)
val scalaSource = settingKey[File]("Default Scala source directory.").withRank(ASetting)
val javaSource = settingKey[File]("Default Java source directory.").withRank(ASetting)
val sourceDirectories = settingKey[Seq[File]]("List of all source directories, both managed and unmanaged.").withRank(AMinusSetting)
val unmanagedSourceDirectories = settingKey[Seq[File]]("Unmanaged source directories, which contain manually created sources.").withRank(ASetting)
val unmanagedSources = taskKey[Seq[File]]("Unmanaged sources, which are manually created.").withRank(BPlusTask)
val managedSourceDirectories = settingKey[Seq[File]]("Managed source directories, which contain sources generated by the build.").withRank(BSetting)
val managedSources = taskKey[Seq[File]]("Sources generated by the build.").withRank(BTask)
val sources = taskKey[Seq[File]]("All sources, both managed and unmanaged.").withRank(BTask)
val sourcesInBase = settingKey[Boolean]("If true, sources from the project's base directory are included as main sources.")
// Filters
val includeFilter = SettingKey[FileFilter]("include-filter", "Filter for including sources and resources files from default directories.", CSetting)
val excludeFilter = SettingKey[FileFilter]("exclude-filter", "Filter for excluding sources and resources files from default directories.", CSetting)
val includeFilter = settingKey[FileFilter]("Filter for including sources and resources files from default directories.").withRank(CSetting)
val excludeFilter = settingKey[FileFilter]("Filter for excluding sources and resources files from default directories.").withRank(CSetting)
// Resource paths
val resourceDirectory = SettingKey[File]("resource-directory", "Default unmanaged resource directory, used for user-defined resources.", ASetting)
val resourceManaged = SettingKey[File]("resource-managed", "Default managed resource directory, used when generating resources.", BSetting)
val unmanagedResourceDirectories = SettingKey[Seq[File]]("unmanaged-resource-directories", "Unmanaged resource directories, containing resources manually created by the user.", AMinusSetting)
val unmanagedResources = TaskKey[Seq[File]]("unmanaged-resources", "Unmanaged resources, which are manually created.", BPlusTask)
val managedResourceDirectories = SettingKey[Seq[File]]("managed-resource-directories", "List of managed resource directories.", AMinusSetting)
val managedResources = TaskKey[Seq[File]]("managed-resources", "Resources generated by the build.", BTask)
val resourceDirectories = SettingKey[Seq[File]]("resource-directories", "List of all resource directories, both managed and unmanaged.", BPlusSetting)
val resources = TaskKey[Seq[File]]("resources", "All resource files, both managed and unmanaged.", BTask)
val resourceDirectory = settingKey[File]("Default unmanaged resource directory, used for user-defined resources.").withRank(ASetting)
val resourceManaged = settingKey[File]("Default managed resource directory, used when generating resources.").withRank(BSetting)
val unmanagedResourceDirectories = settingKey[Seq[File]]("Unmanaged resource directories, containing resources manually created by the user.").withRank(AMinusSetting)
val unmanagedResources = taskKey[Seq[File]]("Unmanaged resources, which are manually created.").withRank(BPlusTask)
val managedResourceDirectories = settingKey[Seq[File]]("List of managed resource directories.").withRank(AMinusSetting)
val managedResources = taskKey[Seq[File]]("Resources generated by the build.").withRank(BTask)
val resourceDirectories = settingKey[Seq[File]]("List of all resource directories, both managed and unmanaged.").withRank(BPlusSetting)
val resources = taskKey[Seq[File]]("All resource files, both managed and unmanaged.").withRank(BTask)
// Output paths
val classDirectory = SettingKey[File]("class-directory", "Directory for compiled classes and copied resources.", AMinusSetting)
val cleanFiles = TaskKey[Seq[File]]("clean-files", "The files to recursively delete during a clean.", BSetting)
val cleanKeepFiles = SettingKey[Seq[File]]("clean-keep-files", "Files or directories to keep during a clean. Must be direct children of target.", CSetting)
val crossPaths = SettingKey[Boolean]("cross-paths", "If true, enables cross paths, which distinguish input and output directories for cross-building.", ASetting)
val taskTemporaryDirectory = SettingKey[File]("task-temporary-directory", "Directory used for temporary files for tasks that is deleted after each task execution.", DSetting)
val classDirectory = settingKey[File]("Directory for compiled classes and copied resources.").withRank(AMinusSetting)
val cleanFiles = taskKey[Seq[File]]("The files to recursively delete during a clean.").withRank(BSetting)
val cleanKeepFiles = settingKey[Seq[File]]("Files or directories to keep during a clean. Must be direct children of target.").withRank(CSetting)
val crossPaths = settingKey[Boolean]("If true, enables cross paths, which distinguish input and output directories for cross-building.").withRank(ASetting)
val taskTemporaryDirectory = settingKey[File]("Directory used for temporary files for tasks that is deleted after each task execution.").withRank(DSetting)
// Generators
val sourceGenerators = SettingKey[Seq[Task[Seq[File]]]]("source-generators", "List of tasks that generate sources.", CSetting)
val resourceGenerators = SettingKey[Seq[Task[Seq[File]]]]("resource-generators", "List of tasks that generate resources.", CSetting)
val sourceGenerators = settingKey[Seq[Task[Seq[File]]]]("List of tasks that generate sources.").withRank(CSetting)
val resourceGenerators = settingKey[Seq[Task[Seq[File]]]]("List of tasks that generate resources.").withRank(CSetting)
// compile/doc keys
val autoCompilerPlugins = SettingKey[Boolean]("auto-compiler-plugins", "If true, enables automatically generating -Xplugin arguments to the compiler based on the classpath for the " + CompilerPlugin.name + " configuration.", AMinusSetting)
val maxErrors = SettingKey[Int]("max-errors", "The maximum number of errors, such as compile errors, to list.", ASetting)
val scalacOptions = TaskKey[Seq[String]]("scalac-options", "Options for the Scala compiler.", BPlusTask)
val javacOptions = TaskKey[Seq[String]]("javac-options", "Options for the Java compiler.", BPlusTask)
val incOptions = TaskKey[IncOptions]("inc-options", "Options for the incremental compiler.", BTask)
val compileOrder = SettingKey[CompileOrder]("compile-order", "Configures the order in which Java and sources within a single compilation are compiled. Valid values are: JavaThenScala, ScalaThenJava, or Mixed.", BPlusSetting)
val initialCommands = SettingKey[String]("initial-commands", "Initial commands to execute when starting up the Scala interpreter.", AMinusSetting)
val cleanupCommands = SettingKey[String]("cleanup-commands", "Commands to execute before the Scala interpreter exits.", BMinusSetting)
val asciiGraphWidth = SettingKey[Int]("asciiGraphWidth", "Determines maximum width of the settings graph in ASCII mode", AMinusSetting)
val compileOptions = TaskKey[CompileOptions]("compile-options", "Collects basic options to configure compilers", DTask)
val compileInputs = TaskKey[Inputs]("compile-inputs", "Collects all inputs needed for compilation.", DTask)
val scalaHome = SettingKey[Option[File]]("scala-home", "If Some, defines the local Scala installation to use for compilation, running, and testing.", ASetting)
val scalaInstance = TaskKey[ScalaInstance]("scala-instance", "Defines the Scala instance to use for compilation, running, and testing.", DTask)
val scalaOrganization = SettingKey[String]("scala-organization", "Organization/group ID of the Scala used in the project. Default value is 'org.scala-lang'. This is an advanced setting used for clones of the Scala Language. It should be disregarded in standard use cases.", CSetting)
val scalaVersion = SettingKey[String]("scala-version", "The version of Scala used for building.", APlusSetting)
val scalaBinaryVersion = SettingKey[String]("scala-binary-version", "The Scala version substring describing binary compatibility.", BPlusSetting)
val crossScalaVersions = SettingKey[Seq[String]]("cross-scala-versions", "The versions of Scala used when cross-building.", BPlusSetting)
val crossVersion = SettingKey[CrossVersion]("cross-version", "Configures handling of the Scala version when cross-building.", CSetting)
val classpathOptions = SettingKey[ClasspathOptions]("classpath-options", "Configures handling of Scala classpaths.", DSetting)
val discoveredSbtPlugins = TaskKey[PluginDiscovery.DiscoveredNames]("discovered-sbt-plugins", "The names of sbt plugin-related modules (modules that extend Build, Plugin, AutoPlugin) defined by this project.", CTask)
val sbtPlugin = SettingKey[Boolean]("sbt-plugin", "If true, enables adding sbt as a dependency and auto-generation of the plugin descriptor file.", BMinusSetting)
val pluginCrossBuild = TaskKey[Unit]("pluginCrossBuild", "Dummy task to scope `sbtVersion in pluginCrossBuild`, which gets used for plugin compilation.")
val crossSbtVersions = SettingKey[Seq[String]]("crossSbtVersions", "The versions of Sbt used when cross-building an sbt plugin.")
val printWarnings = TaskKey[Unit]("print-warnings", "Shows warnings from compilation, including ones that weren't printed initially.", BPlusTask)
val fileInputOptions = SettingKey[Seq[String]]("file-input-options", "Options that take file input, which may invalidate the cache.", CSetting)
val scalaCompilerBridgeSource = SettingKey[ModuleID]("scala-compiler-bridge-source", "Configures the module ID of the sources of the compiler bridge.", CSetting)
val scalaArtifacts = SettingKey[Seq[String]]("scala-artifacts", "Configures the list of artifacts which should match the Scala binary version", CSetting)
val enableBinaryCompileAnalysis = SettingKey[Boolean]("binary-analysis", "Writes the analysis file in binary format")
val autoCompilerPlugins = settingKey[Boolean]("If true, enables automatically generating -Xplugin arguments to the compiler based on the classpath for the " + CompilerPlugin.name + " configuration.").withRank(AMinusSetting)
val maxErrors = settingKey[Int]("The maximum number of errors, such as compile errors, to list.").withRank(ASetting)
val scalacOptions = taskKey[Seq[String]]("Options for the Scala compiler.").withRank(BPlusTask)
val javacOptions = taskKey[Seq[String]]("Options for the Java compiler.").withRank(BPlusTask)
val incOptions = taskKey[IncOptions]("Options for the incremental compiler.").withRank(BTask)
val compileOrder = settingKey[CompileOrder]("Configures the order in which Java and sources within a single compilation are compiled. Valid values are: JavaThenScala, ScalaThenJava, or Mixed.").withRank(BPlusSetting)
val initialCommands = settingKey[String]("Initial commands to execute when starting up the Scala interpreter.").withRank(AMinusSetting)
val cleanupCommands = settingKey[String]("Commands to execute before the Scala interpreter exits.").withRank(BMinusSetting)
val asciiGraphWidth = settingKey[Int]("Determines maximum width of the settings graph in ASCII mode").withRank(AMinusSetting)
val compileOptions = taskKey[CompileOptions]("Collects basic options to configure compilers").withRank(DTask)
val compileInputs = taskKey[Inputs]("Collects all inputs needed for compilation.").withRank(DTask)
val scalaHome = settingKey[Option[File]]("If Some, defines the local Scala installation to use for compilation, running, and testing.").withRank(ASetting)
val scalaInstance = taskKey[ScalaInstance]("Defines the Scala instance to use for compilation, running, and testing.").withRank(DTask)
val scalaOrganization = settingKey[String]("Organization/group ID of the Scala used in the project. Default value is 'org.scala-lang'. This is an advanced setting used for clones of the Scala Language. It should be disregarded in standard use cases.").withRank(CSetting)
val scalaVersion = settingKey[String]("The version of Scala used for building.").withRank(APlusSetting)
val scalaBinaryVersion = settingKey[String]("The Scala version substring describing binary compatibility.").withRank(BPlusSetting)
val crossScalaVersions = settingKey[Seq[String]]("The versions of Scala used when cross-building.").withRank(BPlusSetting)
val crossVersion = settingKey[CrossVersion]("Configures handling of the Scala version when cross-building.").withRank(CSetting)
val classpathOptions = settingKey[ClasspathOptions]("Configures handling of Scala classpaths.").withRank(DSetting)
val discoveredSbtPlugins = taskKey[PluginDiscovery.DiscoveredNames]("The names of sbt plugin-related modules (modules that extend Build, Plugin, AutoPlugin) defined by this project.").withRank(CTask)
val sbtPlugin = settingKey[Boolean]("If true, enables adding sbt as a dependency and auto-generation of the plugin descriptor file.").withRank(BMinusSetting)
val pluginCrossBuild = taskKey[Unit]("Dummy task to scope `sbtVersion in pluginCrossBuild`, which gets used for plugin compilation.")
val crossSbtVersions = settingKey[Seq[String]]("The versions of Sbt used when cross-building an sbt plugin.")
val printWarnings = taskKey[Unit]("Shows warnings from compilation, including ones that weren't printed initially.").withRank(BPlusTask)
val fileInputOptions = settingKey[Seq[String]]("Options that take file input, which may invalidate the cache.").withRank(CSetting)
val scalaCompilerBridgeSource = settingKey[ModuleID]("Configures the module ID of the sources of the compiler bridge.").withRank(CSetting)
val scalaArtifacts = settingKey[Seq[String]]("Configures the list of artifacts which should match the Scala binary version").withRank(CSetting)
val enableBinaryCompileAnalysis = settingKey[Boolean]("Writes the analysis file in binary format")
val clean = TaskKey[Unit]("clean", "Deletes files produced by the build, such as generated sources, compiled classes, and task caches.", APlusTask)
val console = TaskKey[Unit]("console", "Starts the Scala interpreter with the project classes on the classpath.", APlusTask)
val consoleQuick = TaskKey[Unit]("console-quick", "Starts the Scala interpreter with the project dependencies on the classpath.", ATask, console)
val consoleProject = TaskKey[Unit]("console-project", "Starts the Scala interpreter with the sbt and the build definition on the classpath and useful imports.", AMinusTask)
val compile = TaskKey[CompileAnalysis]("compile", "Compiles sources.", APlusTask)
val manipulateBytecode = TaskKey[CompileResult]("manipulateBytecode", "Manipulates generated bytecode", BTask)
val compileIncremental = TaskKey[CompileResult]("compileIncremental", "Actually runs the incremental compilation", DTask)
val previousCompile = TaskKey[PreviousResult]("readAnalysis", "Read the incremental compiler analysis from disk", DTask)
val compilers = TaskKey[Compilers]("compilers", "Defines the Scala and Java compilers to use for compilation.", DTask)
val compileAnalysisFilename = TaskKey[String]("compileAnalysisFilename", "Defines the filename used to store the incremental compiler analysis file (inside the streams cacheDirectory).", DTask)
val compileIncSetup = TaskKey[Setup]("inc-compile-setup", "Configures aspects of incremental compilation.", DTask)
val compilerCache = TaskKey[GlobalsCache]("compiler-cache", "Cache of scala.tools.nsc.Global instances. This should typically be cached so that it isn't recreated every task run.", DTask)
val stateCompilerCache = AttributeKey[GlobalsCache]("compiler-cache", "Internal use: Global cache.")
val classpathEntryDefinesClass = TaskKey[File => DefinesClass]("classpath-entry-defines-class", "Internal use: provides a function that determines whether the provided file contains a given class.", Invisible)
val doc = TaskKey[File]("doc", "Generates API documentation.", AMinusTask)
val copyResources = TaskKey[Seq[(File, File)]]("copy-resources", "Copies resources to the output directory.", AMinusTask)
val aggregate = SettingKey[Boolean]("aggregate", "Configures task aggregation.", BMinusSetting)
val sourcePositionMappers = TaskKey[Seq[xsbti.Position => Option[xsbti.Position]]]("source-position-mappers", "Maps positions in generated source files to the original source it was generated from", DTask)
val clean = taskKey[Unit]("Deletes files produced by the build, such as generated sources, compiled classes, and task caches.").withRank(APlusTask)
val console = taskKey[Unit]("Starts the Scala interpreter with the project classes on the classpath.").withRank(APlusTask)
val consoleQuick = TaskKey[Unit]("consoleQuick", "Starts the Scala interpreter with the project dependencies on the classpath.", ATask, console)
val consoleProject = taskKey[Unit]("Starts the Scala interpreter with the sbt and the build definition on the classpath and useful imports.").withRank(AMinusTask)
val compile = taskKey[CompileAnalysis]("Compiles sources.").withRank(APlusTask)
val manipulateBytecode = taskKey[CompileResult]("Manipulates generated bytecode").withRank(BTask)
val compileIncremental = taskKey[CompileResult]("Actually runs the incremental compilation").withRank(DTask)
val previousCompile = taskKey[PreviousResult]("Read the incremental compiler analysis from disk").withRank(DTask)
val compilers = taskKey[Compilers]("Defines the Scala and Java compilers to use for compilation.").withRank(DTask)
val compileAnalysisFilename = taskKey[String]("Defines the filename used to store the incremental compiler analysis file (inside the streams cacheDirectory).").withRank(DTask)
val compileIncSetup = taskKey[Setup]("Configures aspects of incremental compilation.").withRank(DTask)
val compilerCache = taskKey[GlobalsCache]("Cache of scala.tools.nsc.Global instances. This should typically be cached so that it isn't recreated every task run.").withRank(DTask)
val stateCompilerCache = AttributeKey[GlobalsCache]("stateCompilerCache", "Internal use: Global cache.")
val classpathEntryDefinesClass = taskKey[File => DefinesClass]("Internal use: provides a function that determines whether the provided file contains a given class.").withRank(Invisible)
val doc = taskKey[File]("Generates API documentation.").withRank(AMinusTask)
val copyResources = taskKey[Seq[(File, File)]]("Copies resources to the output directory.").withRank(AMinusTask)
val aggregate = settingKey[Boolean]("Configures task aggregation.").withRank(BMinusSetting)
val sourcePositionMappers = taskKey[Seq[xsbti.Position => Option[xsbti.Position]]]("Maps positions in generated source files to the original source it was generated from").withRank(DTask)
// package keys
val packageBin = TaskKey[File]("package-bin", "Produces a main artifact, such as a binary jar.", ATask)
val `package` = TaskKey[File]("package", "Produces the main artifact, such as a binary jar. This is typically an alias for the task that actually does the packaging.", APlusTask)
val packageDoc = TaskKey[File]("package-doc", "Produces a documentation artifact, such as a jar containing API documentation.", AMinusTask)
val packageSrc = TaskKey[File]("package-src", "Produces a source artifact, such as a jar containing sources and resources.", AMinusTask)
val packageBin = taskKey[File]("Produces a main artifact, such as a binary jar.").withRank(ATask)
val `package` = taskKey[File]("Produces the main artifact, such as a binary jar. This is typically an alias for the task that actually does the packaging.").withRank(APlusTask)
val packageDoc = taskKey[File]("Produces a documentation artifact, such as a jar containing API documentation.").withRank(AMinusTask)
val packageSrc = taskKey[File]("Produces a source artifact, such as a jar containing sources and resources.").withRank(AMinusTask)
val packageOptions = TaskKey[Seq[PackageOption]]("package-options", "Options for packaging.", BTask)
val packageConfiguration = TaskKey[Package.Configuration]("package-configuration", "Collects all inputs needed for packaging.", DTask)
val artifactPath = SettingKey[File]("artifact-path", "The location of a generated artifact.", BPlusSetting)
val artifact = SettingKey[Artifact]("artifact", "Describes an artifact.", BMinusSetting)
val artifactClassifier = SettingKey[Option[String]]("artifact-classifier", "Sets the classifier used by the default artifact definition.", BSetting)
val artifactName = SettingKey[(ScalaVersion, ModuleID, Artifact) => String]("artifact-name", "Function that produces the artifact name from its definition.", CSetting)
val mappings = TaskKey[Seq[(File, String)]]("mappings", "Defines the mappings from a file to a path, used by packaging, for example.", BTask)
val fileMappings = TaskKey[Seq[(File, File)]]("file-mappings", "Defines the mappings from a file to a file, used for copying files, for example.", BMinusTask)
val packageOptions = taskKey[Seq[PackageOption]]("Options for packaging.").withRank(BTask)
val packageConfiguration = taskKey[Package.Configuration]("Collects all inputs needed for packaging.").withRank(DTask)
val artifactPath = settingKey[File]("The location of a generated artifact.").withRank(BPlusSetting)
val artifact = settingKey[Artifact]("Describes an artifact.").withRank(BMinusSetting)
val artifactClassifier = settingKey[Option[String]]("Sets the classifier used by the default artifact definition.").withRank(BSetting)
val artifactName = settingKey[(ScalaVersion, ModuleID, Artifact) => String]("Function that produces the artifact name from its definition.").withRank(CSetting)
val mappings = taskKey[Seq[(File, String)]]("Defines the mappings from a file to a path, used by packaging, for example.").withRank(BTask)
val fileMappings = taskKey[Seq[(File, File)]]("Defines the mappings from a file to a file, used for copying files, for example.").withRank(BMinusTask)
// Run Keys
val selectMainClass = TaskKey[Option[String]]("select-main-class", "Selects the main class to run.", BMinusTask)
val mainClass = TaskKey[Option[String]]("main-class", "Defines the main class for packaging or running.", BPlusTask)
val run = InputKey[Unit]("run", "Runs a main class, passing along arguments provided on the command line.", APlusTask)
val runMain = InputKey[Unit]("run-main", "Runs the main class selected by the first argument, passing the remaining arguments to the main method.", ATask)
val discoveredMainClasses = TaskKey[Seq[String]]("discovered-main-classes", "Auto-detects main classes.", BMinusTask)
val runner = TaskKey[ScalaRun]("runner", "Implementation used to run a main class.", DTask)
val trapExit = SettingKey[Boolean]("trap-exit", "If true, enables exit trapping and thread management for 'run'-like tasks. This is currently only suitable for serially-executed 'run'-like tasks.", CSetting)
val selectMainClass = taskKey[Option[String]]("Selects the main class to run.").withRank(BMinusTask)
val mainClass = taskKey[Option[String]]("Defines the main class for packaging or running.").withRank(BPlusTask)
val run = inputKey[Unit]("Runs a main class, passing along arguments provided on the command line.").withRank(APlusTask)
val runMain = inputKey[Unit]("Runs the main class selected by the first argument, passing the remaining arguments to the main method.").withRank(ATask)
val discoveredMainClasses = taskKey[Seq[String]]("Auto-detects main classes.").withRank(BMinusTask)
val runner = taskKey[ScalaRun]("Implementation used to run a main class.").withRank(DTask)
val trapExit = settingKey[Boolean]("If true, enables exit trapping and thread management for 'run'-like tasks. This is currently only suitable for serially-executed 'run'-like tasks.").withRank(CSetting)
val fork = SettingKey[Boolean]("fork", "If true, forks a new JVM when running. If false, runs in the same JVM as the build.", ASetting)
val forkOptions = TaskKey[ForkOptions]("fork-options", "Configures JVM forking.", DSetting)
val outputStrategy = SettingKey[Option[sbt.OutputStrategy]]("output-strategy", "Selects how to log output when running a main class.", DSetting)
val connectInput = SettingKey[Boolean]("connect-input", "If true, connects standard input when running a main class forked.", CSetting)
val javaHome = SettingKey[Option[File]]("java-home", "Selects the Java installation used for compiling and forking. If None, uses the Java installation running the build.", ASetting)
val javaOptions = TaskKey[Seq[String]]("java-options", "Options passed to a new JVM when forking.", BPlusTask)
val envVars = TaskKey[Map[String, String]]("envVars", "Environment variables used when forking a new JVM", BTask)
val fork = settingKey[Boolean]("If true, forks a new JVM when running. If false, runs in the same JVM as the build.").withRank(ASetting)
val forkOptions = taskKey[ForkOptions]("Configures JVM forking.").withRank(DSetting)
val outputStrategy = settingKey[Option[sbt.OutputStrategy]]("Selects how to log output when running a main class.").withRank(DSetting)
val connectInput = settingKey[Boolean]("If true, connects standard input when running a main class forked.").withRank(CSetting)
val javaHome = settingKey[Option[File]]("Selects the Java installation used for compiling and forking. If None, uses the Java installation running the build.").withRank(ASetting)
val javaOptions = taskKey[Seq[String]]("Options passed to a new JVM when forking.").withRank(BPlusTask)
val envVars = taskKey[Map[String, String]]("Environment variables used when forking a new JVM").withRank(BTask)
val bgJobService = settingKey[BackgroundJobService]("Job manager used to run background jobs.")
val bgList = taskKey[Seq[JobHandle]]("List running background jobs.")
@ -271,60 +271,60 @@ object Keys {
val bgCopyClasspath = settingKey[Boolean]("Copies classpath on bgRun to prevent conflict.")
// Test Keys
val testLoader = TaskKey[ClassLoader]("test-loader", "Provides the class loader used for testing.", DTask)
val loadedTestFrameworks = TaskKey[Map[TestFramework, Framework]]("loaded-test-frameworks", "Loads Framework definitions from the test loader.", DTask)
val definedTests = TaskKey[Seq[TestDefinition]]("defined-tests", "Provides the list of defined tests.", BMinusTask)
val definedTestNames = TaskKey[Seq[String]]("defined-test-names", "Provides the set of defined test names.", BMinusTask)
val executeTests = TaskKey[Tests.Output]("execute-tests", "Executes all tests, producing a report.", CTask)
val test = TaskKey[Unit]("test", "Executes all tests.", APlusTask)
val testOnly = InputKey[Unit]("test-only", "Executes the tests provided as arguments or all tests if no arguments are provided.", ATask)
val testQuick = InputKey[Unit]("test-quick", "Executes the tests that either failed before, were not run or whose transitive dependencies changed, among those provided as arguments.", ATask)
val testOptions = TaskKey[Seq[TestOption]]("test-options", "Options for running tests.", BPlusTask)
val testFrameworks = SettingKey[Seq[TestFramework]]("test-frameworks", "Registered, although not necessarily present, test frameworks.", CTask)
val testListeners = TaskKey[Seq[TestReportListener]]("test-listeners", "Defines test listeners.", DTask)
val testForkedParallel = SettingKey[Boolean]("test-forked-parallel", "Whether forked tests should be executed in parallel", CTask)
val testExecution = TaskKey[Tests.Execution]("test-execution", "Settings controlling test execution", DTask)
val testFilter = TaskKey[Seq[String] => Seq[String => Boolean]]("test-filter", "Filter controlling whether the test is executed", DTask)
val testResultLogger = SettingKey[TestResultLogger]("test-result-logger", "Logs results after a test task completes.", DTask)
val testGrouping = TaskKey[Seq[Tests.Group]]("test-grouping", "Collects discovered tests into groups. Whether to fork and the options for forking are configurable on a per-group basis.", BMinusTask)
val isModule = AttributeKey[Boolean]("is-module", "True if the target is a module.", DSetting)
val testLoader = taskKey[ClassLoader]("Provides the class loader used for testing.").withRank(DTask)
val loadedTestFrameworks = taskKey[Map[TestFramework, Framework]]("Loads Framework definitions from the test loader.").withRank(DTask)
val definedTests = taskKey[Seq[TestDefinition]]("Provides the list of defined tests.").withRank(BMinusTask)
val definedTestNames = taskKey[Seq[String]]("Provides the set of defined test names.").withRank(BMinusTask)
val executeTests = taskKey[Tests.Output]("Executes all tests, producing a report.").withRank(CTask)
val test = taskKey[Unit]("Executes all tests.").withRank(APlusTask)
val testOnly = inputKey[Unit]("Executes the tests provided as arguments or all tests if no arguments are provided.").withRank(ATask)
val testQuick = inputKey[Unit]("Executes the tests that either failed before, were not run or whose transitive dependencies changed, among those provided as arguments.").withRank(ATask)
val testOptions = taskKey[Seq[TestOption]]("Options for running tests.").withRank(BPlusTask)
val testFrameworks = settingKey[Seq[TestFramework]]("Registered, although not necessarily present, test frameworks.").withRank(CTask)
val testListeners = taskKey[Seq[TestReportListener]]("Defines test listeners.").withRank(DTask)
val testForkedParallel = settingKey[Boolean]("Whether forked tests should be executed in parallel").withRank(CTask)
val testExecution = taskKey[Tests.Execution]("Settings controlling test execution").withRank(DTask)
val testFilter = taskKey[Seq[String] => Seq[String => Boolean]]("Filter controlling whether the test is executed").withRank(DTask)
val testResultLogger = settingKey[TestResultLogger]("Logs results after a test task completes.").withRank(DTask)
val testGrouping = taskKey[Seq[Tests.Group]]("Collects discovered tests into groups. Whether to fork and the options for forking are configurable on a per-group basis.").withRank(BMinusTask)
val isModule = AttributeKey[Boolean]("isModule", "True if the target is a module.", DSetting)
// Classpath/Dependency Management Keys
type Classpath = Def.Classpath
val name = SettingKey[String]("name", "Project name.", APlusSetting)
val normalizedName = SettingKey[String]("normalized-name", "Project name transformed from mixed case and spaces to lowercase and dash-separated.", BSetting)
val description = SettingKey[String]("description", "Project description.", BSetting)
val homepage = SettingKey[Option[URL]]("homepage", "Project homepage.", BSetting)
val startYear = SettingKey[Option[Int]]("start-year", "Year in which the project started.", BMinusSetting)
val licenses = SettingKey[Seq[(String, URL)]]("licenses", "Project licenses as (name, url) pairs.", BMinusSetting)
val organization = SettingKey[String]("organization", "Organization/group ID.", APlusSetting)
val organizationName = SettingKey[String]("organization-name", "Organization full/formal name.", BMinusSetting)
val organizationHomepage = SettingKey[Option[URL]]("organization-homepage", "Organization homepage.", BMinusSetting)
val developers = SettingKey[List[Developer]]("developers", "List of developers implicated in the project", BMinusSetting)
val apiURL = SettingKey[Option[URL]]("api-url", "Base URL for API documentation.", BMinusSetting)
val entryApiURL = AttributeKey[URL]("entry-api-url", "Base URL for the API documentation for a classpath entry.")
val apiMappings = TaskKey[Map[File, URL]]("api-mappings", "Mappings from classpath entry to API documentation base URL.", BMinusSetting)
val autoAPIMappings = SettingKey[Boolean]("auto-api-mappings", "If true, automatically manages mappings to the API doc URL.", BMinusSetting)
val scmInfo = SettingKey[Option[ScmInfo]]("scm-info", "Basic SCM information for the project.", BMinusSetting)
val projectInfo = SettingKey[ModuleInfo]("project-info", "Addition project information like formal name, homepage, licenses etc.", CSetting)
val defaultConfiguration = SettingKey[Option[Configuration]]("default-configuration", "Defines the configuration used when none is specified for a dependency in ivyXML.", CSetting)
val name = settingKey[String]("Project name.").withRank(APlusSetting)
val normalizedName = settingKey[String]("Project name transformed from mixed case and spaces to lowercase and dash-separated.").withRank(BSetting)
val description = settingKey[String]("Project description.").withRank(BSetting)
val homepage = settingKey[Option[URL]]("Project homepage.").withRank(BSetting)
val startYear = settingKey[Option[Int]]("Year in which the project started.").withRank(BMinusSetting)
val licenses = settingKey[Seq[(String, URL)]]("Project licenses as (name, url) pairs.").withRank(BMinusSetting)
val organization = settingKey[String]("Organization/group ID.").withRank(APlusSetting)
val organizationName = settingKey[String]("Organization full/formal name.").withRank(BMinusSetting)
val organizationHomepage = settingKey[Option[URL]]("Organization homepage.").withRank(BMinusSetting)
val developers = settingKey[List[Developer]]("List of developers implicated in the project").withRank(BMinusSetting)
val apiURL = settingKey[Option[URL]]("Base URL for API documentation.").withRank(BMinusSetting)
val entryApiURL = AttributeKey[URL]("entryApiURL", "Base URL for the API documentation for a classpath entry.")
val apiMappings = taskKey[Map[File, URL]]("Mappings from classpath entry to API documentation base URL.").withRank(BMinusSetting)
val autoAPIMappings = settingKey[Boolean]("If true, automatically manages mappings to the API doc URL.").withRank(BMinusSetting)
val scmInfo = settingKey[Option[ScmInfo]]("Basic SCM information for the project.").withRank(BMinusSetting)
val projectInfo = settingKey[ModuleInfo]("Addition project information like formal name, homepage, licenses etc.").withRank(CSetting)
val defaultConfiguration = settingKey[Option[Configuration]]("Defines the configuration used when none is specified for a dependency in ivyXML.").withRank(CSetting)
val products = TaskKey[Seq[File]]("products", "Build products that get packaged.", BMinusTask)
val productDirectories = TaskKey[Seq[File]]("product-directories", "Base directories of build products.", CTask)
val exportJars = SettingKey[Boolean]("export-jars", "Determines whether the exported classpath for this project contains classes (false) or a packaged jar (true).", BSetting)
val exportedProducts = TaskKey[Classpath]("exported-products", "Build products that go on the exported classpath.", CTask)
val exportedProductsIfMissing = TaskKey[Classpath]("exported-products-if-missing", "Build products that go on the exported classpath if missing.", CTask)
val exportedProductsNoTracking = TaskKey[Classpath]("exported-products-no-tracking", "Just the exported classpath without triggering the compilation.", CTask)
val unmanagedClasspath = TaskKey[Classpath]("unmanaged-classpath", "Classpath entries (deep) that are manually managed.", BPlusTask)
val unmanagedJars = TaskKey[Classpath]("unmanaged-jars", "Classpath entries for the current project (shallow) that are manually managed.", BPlusTask)
val managedClasspath = TaskKey[Classpath]("managed-classpath", "The classpath consisting of external, managed library dependencies.", BMinusTask)
val internalDependencyClasspath = TaskKey[Classpath]("internal-dependency-classpath", "The internal (inter-project) classpath.", CTask)
val externalDependencyClasspath = TaskKey[Classpath]("external-dependency-classpath", "The classpath consisting of library dependencies, both managed and unmanaged.", BMinusTask)
val dependencyClasspath = TaskKey[Classpath]("dependency-classpath", "The classpath consisting of internal and external, managed and unmanaged dependencies.", BPlusTask)
val fullClasspath = TaskKey[Classpath]("full-classpath", "The exported classpath, consisting of build products and unmanaged and managed, internal and external dependencies.", BPlusTask)
val trackInternalDependencies = SettingKey[TrackLevel]("track-internal-dependencies", "The level of tracking for the internal (inter-project) dependency.", BSetting)
val exportToInternal = SettingKey[TrackLevel]("export-to-internal", "The level of tracking for this project by the internal callers.", BSetting)
val products = taskKey[Seq[File]]("Build products that get packaged.").withRank(BMinusTask)
val productDirectories = taskKey[Seq[File]]("Base directories of build products.").withRank(CTask)
val exportJars = settingKey[Boolean]("Determines whether the exported classpath for this project contains classes (false) or a packaged jar (true).").withRank(BSetting)
val exportedProducts = taskKey[Classpath]("Build products that go on the exported classpath.").withRank(CTask)
val exportedProductsIfMissing = taskKey[Classpath]("Build products that go on the exported classpath if missing.").withRank(CTask)
val exportedProductsNoTracking = taskKey[Classpath]("Just the exported classpath without triggering the compilation.").withRank(CTask)
val unmanagedClasspath = taskKey[Classpath]("Classpath entries (deep) that are manually managed.").withRank(BPlusTask)
val unmanagedJars = taskKey[Classpath]("Classpath entries for the current project (shallow) that are manually managed.").withRank(BPlusTask)
val managedClasspath = taskKey[Classpath]("The classpath consisting of external, managed library dependencies.").withRank(BMinusTask)
val internalDependencyClasspath = taskKey[Classpath]("The internal (inter-project) classpath.").withRank(CTask)
val externalDependencyClasspath = taskKey[Classpath]("The classpath consisting of library dependencies, both managed and unmanaged.").withRank(BMinusTask)
val dependencyClasspath = taskKey[Classpath]("The classpath consisting of internal and external, managed and unmanaged dependencies.").withRank(BPlusTask)
val fullClasspath = taskKey[Classpath]("The exported classpath, consisting of build products and unmanaged and managed, internal and external dependencies.").withRank(BPlusTask)
val trackInternalDependencies = settingKey[TrackLevel]("The level of tracking for the internal (inter-project) dependency.").withRank(BSetting)
val exportToInternal = settingKey[TrackLevel]("The level of tracking for this project by the internal callers.").withRank(BSetting)
val exportedProductJars = taskKey[Classpath]("Build products that go on the exported classpath as JARs.")
val exportedProductJarsIfMissing = taskKey[Classpath]("Build products that go on the exported classpath as JARs if missing.")
val exportedProductJarsNoTracking = taskKey[Classpath]("Just the exported classpath as JARs without triggering the compilation.")
@ -332,138 +332,137 @@ object Keys {
val dependencyClasspathAsJars = taskKey[Classpath]("The classpath consisting of internal and external, managed and unmanaged dependencies, all as JARs.")
val fullClasspathAsJars = taskKey[Classpath]("The exported classpath, consisting of build products and unmanaged and managed, internal and external dependencies, all as JARs.")
val internalConfigurationMap = SettingKey[Configuration => Configuration]("internal-configuration-map", "Maps configurations to the actual configuration used to define the classpath.", CSetting)
val classpathConfiguration = TaskKey[Configuration]("classpath-configuration", "The configuration used to define the classpath.", CTask)
val ivyConfiguration = TaskKey[IvyConfiguration]("ivy-configuration", "General dependency management (Ivy) settings, such as the resolvers and paths to use.", DTask)
val ivyConfigurations = SettingKey[Seq[Configuration]]("ivy-configurations", "The defined configurations for dependency management. This may be different from the configurations for Project settings.", BSetting)
val internalConfigurationMap = settingKey[Configuration => Configuration]("Maps configurations to the actual configuration used to define the classpath.").withRank(CSetting)
val classpathConfiguration = taskKey[Configuration]("The configuration used to define the classpath.").withRank(CTask)
val ivyConfiguration = taskKey[IvyConfiguration]("General dependency management (Ivy) settings, such as the resolvers and paths to use.").withRank(DTask)
val ivyConfigurations = settingKey[Seq[Configuration]]("The defined configurations for dependency management. This may be different from the configurations for Project settings.").withRank(BSetting)
// This setting was created to work around the limitation of derived tasks not being able to use task-scoped task: ivyConfiguration in updateSbtClassifiers
val bootIvyConfiguration = TaskKey[IvyConfiguration]("boot-ivy-configuration", "General dependency management (Ivy) settings, configured to retrieve sbt's components.", DTask)
val moduleSettings = TaskKey[ModuleSettings]("module-settings", "Module settings, which configure dependency management for a specific module, such as a project.", DTask)
val unmanagedBase = SettingKey[File]("unmanaged-base", "The default directory for manually managed libraries.", ASetting)
val updateConfiguration = SettingKey[UpdateConfiguration]("update-configuration", "Configuration for resolving and retrieving managed dependencies.", DSetting)
val updateOptions = SettingKey[UpdateOptions]("update-options", "Options for resolving managed dependencies.", DSetting)
val unresolvedWarningConfiguration = TaskKey[UnresolvedWarningConfiguration]("unresolved-warning-configuration", "Configuration for unresolved dependency warning.", DTask)
val dependencyPositions = TaskKey[Map[ModuleID, SourcePosition]]("dependency-positions", "Source positions where the dependencies are defined.", DTask)
val dependencyResolution = TaskKey[DependencyResolution]("dependency-resolution", "Provides the sbt interface to dependency resolution.", CTask)
val publisher = TaskKey[Publisher]("publisher", "Provides the sbt interface to publisher")
val ivySbt = TaskKey[IvySbt]("ivy-sbt", "Provides the sbt interface to Ivy.", CTask)
val ivyModule = TaskKey[IvySbt#Module]("ivy-module", "Provides the sbt interface to a configured Ivy module.", CTask)
val updateCacheName = TaskKey[String]("updateCacheName", "Defines the directory name used to store the update cache files (inside the streams cacheDirectory).", DTask)
val update = TaskKey[UpdateReport]("update", "Resolves and optionally retrieves dependencies, producing a report.", ATask)
val evicted = TaskKey[EvictionWarning]("evicted", "Display detailed eviction warnings.", CTask)
val evictionWarningOptions = SettingKey[EvictionWarningOptions]("eviction-warning-options", "Options on eviction warnings after resolving managed dependencies.", DSetting)
val transitiveUpdate = TaskKey[Seq[UpdateReport]]("transitive-update", "UpdateReports for the internal dependencies of this project.", DTask)
val updateClassifiers = TaskKey[UpdateReport]("update-classifiers", "Resolves and optionally retrieves classified artifacts, such as javadocs and sources, for dependency definitions, transitively.", BPlusTask, update)
val transitiveClassifiers = SettingKey[Seq[String]]("transitive-classifiers", "List of classifiers used for transitively obtaining extra artifacts for sbt or declared dependencies.", BSetting)
val updateSbtClassifiers = TaskKey[UpdateReport]("update-sbt-classifiers", "Resolves and optionally retrieves classifiers, such as javadocs and sources, for sbt, transitively.", BPlusTask, updateClassifiers)
val sourceArtifactTypes = settingKey[Seq[String]]("Ivy artifact types that correspond to source artifacts. Used by IDEs to resolve these resources.") // BSetting
val docArtifactTypes = settingKey[Seq[String]]("Ivy artifact types that correspond to javadoc artifacts. Used by IDEs to resolve these resources.") // BSetting
val bootIvyConfiguration = taskKey[IvyConfiguration]("General dependency management (Ivy) settings, configured to retrieve sbt's components.").withRank(DTask)
val moduleSettings = taskKey[ModuleSettings]("Module settings, which configure dependency management for a specific module, such as a project.").withRank(DTask)
val unmanagedBase = settingKey[File]("The default directory for manually managed libraries.").withRank(ASetting)
val updateConfiguration = settingKey[UpdateConfiguration]("Configuration for resolving and retrieving managed dependencies.").withRank(DSetting)
val updateOptions = settingKey[UpdateOptions]("Options for resolving managed dependencies.").withRank(DSetting)
val unresolvedWarningConfiguration = taskKey[UnresolvedWarningConfiguration]("Configuration for unresolved dependency warning.").withRank(DTask)
val dependencyPositions = taskKey[Map[ModuleID, SourcePosition]]("Source positions where the dependencies are defined.").withRank(DTask)
val dependencyResolution = taskKey[DependencyResolution]("Provides the sbt interface to dependency resolution.").withRank(CTask)
val publisher = taskKey[Publisher]("Provides the sbt interface to publisher")
val ivySbt = taskKey[IvySbt]("Provides the sbt interface to Ivy.").withRank(CTask)
val ivyModule = taskKey[IvySbt#Module]("Provides the sbt interface to a configured Ivy module.").withRank(CTask)
val updateCacheName = taskKey[String]("Defines the directory name used to store the update cache files (inside the streams cacheDirectory).").withRank(DTask)
val update = taskKey[UpdateReport]("Resolves and optionally retrieves dependencies, producing a report.").withRank(ATask)
val evicted = taskKey[EvictionWarning]("Display detailed eviction warnings.").withRank(CTask)
val evictionWarningOptions = settingKey[EvictionWarningOptions]("Options on eviction warnings after resolving managed dependencies.").withRank(DSetting)
val transitiveUpdate = taskKey[Seq[UpdateReport]]("UpdateReports for the internal dependencies of this project.").withRank(DTask)
val updateClassifiers = TaskKey[UpdateReport]("updateClassifiers", "Resolves and optionally retrieves classified artifacts, such as javadocs and sources, for dependency definitions, transitively.", BPlusTask, update)
val transitiveClassifiers = settingKey[Seq[String]]("List of classifiers used for transitively obtaining extra artifacts for sbt or declared dependencies.").withRank(BSetting)
val updateSbtClassifiers = TaskKey[UpdateReport]("updateSbtClassifiers", "Resolves and optionally retrieves classifiers, such as javadocs and sources, for sbt, transitively.", BPlusTask, updateClassifiers)
val sourceArtifactTypes = settingKey[Seq[String]]("Ivy artifact types that correspond to source artifacts. Used by IDEs to resolve these resources.").withRank(BSetting)
val docArtifactTypes = settingKey[Seq[String]]("Ivy artifact types that correspond to javadoc artifacts. Used by IDEs to resolve these resources.").withRank(BSetting)
val publishConfiguration = TaskKey[PublishConfiguration]("publish-configuration", "Configuration for publishing to a repository.", DTask)
val publishLocalConfiguration = TaskKey[PublishConfiguration]("publish-local-configuration", "Configuration for publishing to the local Ivy repository.", DTask)
val publishM2Configuration = TaskKey[PublishConfiguration]("publish-m2-configuration", "Configuration for publishing to the local Maven repository.", DTask)
val makePomConfiguration = SettingKey[MakePomConfiguration]("make-pom-configuration", "Configuration for generating a pom.", DSetting)
val packagedArtifacts = TaskKey[Map[Artifact, File]]("packaged-artifacts", "Packages all artifacts for publishing and maps the Artifact definition to the generated file.", CTask)
val publishMavenStyle = SettingKey[Boolean]("publish-maven-style", "Configures whether to generate and publish a pom (true) or Ivy file (false).", BSetting)
val credentials = TaskKey[Seq[Credentials]]("credentials", "The credentials to use for updating and publishing.", BMinusTask)
val publishConfiguration = taskKey[PublishConfiguration]("Configuration for publishing to a repository.").withRank(DTask)
val publishLocalConfiguration = taskKey[PublishConfiguration]("Configuration for publishing to the local Ivy repository.").withRank(DTask)
val publishM2Configuration = taskKey[PublishConfiguration]("Configuration for publishing to the local Maven repository.").withRank(DTask)
val makePomConfiguration = settingKey[MakePomConfiguration]("Configuration for generating a pom.").withRank(DSetting)
val packagedArtifacts = taskKey[Map[Artifact, File]]("Packages all artifacts for publishing and maps the Artifact definition to the generated file.").withRank(CTask)
val publishMavenStyle = settingKey[Boolean]("Configures whether to generate and publish a pom (true) or Ivy file (false).").withRank(BSetting)
val credentials = taskKey[Seq[Credentials]]("The credentials to use for updating and publishing.").withRank(BMinusTask)
val makePom = TaskKey[File]("make-pom", "Generates a pom for publishing when publishing Maven-style.", BPlusTask)
val deliver = TaskKey[File]("deliver", "Generates the Ivy file for publishing to a repository.", BTask)
val deliverLocal = TaskKey[File]("deliver-local", "Generates the Ivy file for publishing to the local repository.", BTask)
val publish = TaskKey[Unit]("publish", "Publishes artifacts to a repository.", APlusTask)
val publishLocal = TaskKey[Unit]("publish-local", "Publishes artifacts to the local Ivy repository.", APlusTask)
val publishM2 = TaskKey[Unit]("publish-m2", "Publishes artifacts to the local Maven repository.", ATask)
val makePom = taskKey[File]("Generates a pom for publishing when publishing Maven-style.").withRank(BPlusTask)
val deliver = taskKey[File]("Generates the Ivy file for publishing to a repository.").withRank(BTask)
val deliverLocal = taskKey[File]("Generates the Ivy file for publishing to the local repository.").withRank(BTask)
val publish = taskKey[Unit]("Publishes artifacts to a repository.").withRank(APlusTask)
val publishLocal = taskKey[Unit]("Publishes artifacts to the local Ivy repository.").withRank(APlusTask)
val publishM2 = taskKey[Unit]("Publishes artifacts to the local Maven repository.").withRank(ATask)
val pomExtra = SettingKey[NodeSeq]("pom-extra", "Extra XML to insert into the generated POM.", BSetting)
val pomPostProcess = SettingKey[XNode => XNode]("pom-post-process", "Transforms the generated POM.", CSetting)
val pomIncludeRepository = SettingKey[MavenRepository => Boolean]("pom-include-repository", "Selects repositories to include in the generated POM.", CSetting)
val pomAllRepositories = SettingKey[Boolean]("pom-all-repositories", "If true, includes repositories used in module configurations in the pom repositories section. If false, only the common repositories are included.", BMinusSetting)
val pomExtra = settingKey[NodeSeq]("Extra XML to insert into the generated POM.").withRank(BSetting)
val pomPostProcess = settingKey[XNode => XNode]("Transforms the generated POM.").withRank(CSetting)
val pomIncludeRepository = settingKey[MavenRepository => Boolean]("Selects repositories to include in the generated POM.").withRank(CSetting)
val pomAllRepositories = settingKey[Boolean]("If true, includes repositories used in module configurations in the pom repositories section. If false, only the common repositories are included.").withRank(BMinusSetting)
val moduleName = SettingKey[String]("module-name", "The name of the current module, used for dependency management.", BSetting)
val version = SettingKey[String]("version", "The version/revision of the current module.", APlusSetting)
val isSnapshot = SettingKey[Boolean]("is-snapshot", "True if the version of the project is a snapshot version.", BPlusSetting)
val moduleID = SettingKey[ModuleID]("module-id", "A dependency management descriptor. This is currently used for associating a ModuleID with a classpath entry.", BPlusSetting)
val projectID = SettingKey[ModuleID]("project-id", "The dependency management descriptor for the current module.", BMinusSetting)
val overrideBuildResolvers = SettingKey[Boolean]("override-build-resolvers", "Whether or not all the build resolvers should be overridden with what's defined from the launcher.", BMinusSetting)
val bootResolvers = TaskKey[Option[Seq[Resolver]]]("boot-resolvers", "The resolvers used by the sbt launcher.", BMinusSetting)
val appResolvers = SettingKey[Option[Seq[Resolver]]]("app-resolvers", "The resolvers configured for this application by the sbt launcher.", BMinusSetting)
val externalResolvers = TaskKey[Seq[Resolver]]("external-resolvers", "The external resolvers for automatically managed dependencies.", BMinusSetting)
val resolvers = SettingKey[Seq[Resolver]]("resolvers", "The user-defined additional resolvers for automatically managed dependencies.", BMinusTask)
val projectResolver = TaskKey[Resolver]("project-resolver", "Resolver that handles inter-project dependencies.", DTask)
val fullResolvers = TaskKey[Seq[Resolver]]("full-resolvers", "Combines the project resolver, default resolvers, and user-defined resolvers.", CTask)
val otherResolvers = TaskKey[Seq[Resolver]]("other-resolvers", "Resolvers not included in the main resolver chain, such as those in module configurations.", CSetting)
val useJCenter = SettingKey[Boolean]("use-jcenter", "Use JCenter as the default repository.", BSetting)
val moduleConfigurations = SettingKey[Seq[ModuleConfiguration]]("module-configurations", "Defines module configurations, which override resolvers on a per-module basis.", BMinusSetting)
val retrievePattern = SettingKey[String]("retrieve-pattern", "Pattern used to retrieve managed dependencies to the current build.", DSetting)
val retrieveConfiguration = SettingKey[Option[RetrieveConfiguration]]("retrieve-configuration", "Configures retrieving dependencies to the current build.", DSetting)
val offline = SettingKey[Boolean]("offline", "Configures sbt to work without a network connection where possible.", ASetting)
val ivyPaths = SettingKey[IvyPaths]("ivy-paths", "Configures paths used by Ivy for dependency management.", DSetting)
val dependencyCacheDirectory = TaskKey[File]("dependency-cache-directory", "The base directory for cached dependencies.", DTask)
val libraryDependencies = SettingKey[Seq[ModuleID]]("library-dependencies", "Declares managed dependencies.", APlusSetting)
val dependencyOverrides = SettingKey[Seq[ModuleID]]("dependency-overrides", "Declares managed dependency overrides.", BSetting)
val excludeDependencies = SettingKey[Seq[InclExclRule]]("exclude-dependencies", "Declares managed dependency exclusions.", BSetting)
val allDependencies = TaskKey[Seq[ModuleID]]("all-dependencies", "Inter-project and library dependencies.", CTask)
val projectDependencies = TaskKey[Seq[ModuleID]]("project-dependencies", "Inter-project dependencies.", DTask)
val ivyXML = SettingKey[NodeSeq]("ivy-xml", "Defines inline Ivy XML for configuring dependency management.", BSetting)
val scalaModuleInfo = SettingKey[Option[ScalaModuleInfo]]("scala-module-info", "Configures how Scala dependencies are checked, filtered, and injected.", CSetting)
val ivyValidate = SettingKey[Boolean]("ivy-validate", "Enables/disables Ivy validation of module metadata.", BSetting)
val ivyLoggingLevel = SettingKey[UpdateLogging]("ivy-logging-level", "The logging level for updating.", BSetting)
val publishTo = TaskKey[Option[Resolver]]("publish-to", "The resolver to publish to.", ASetting)
val artifacts = SettingKey[Seq[Artifact]]("artifacts", "The artifact definitions for the current module. Must be consistent with " + packagedArtifacts.key.label + ".", BSetting)
val projectDescriptors = TaskKey[Map[ModuleRevisionId, ModuleDescriptor]]("project-descriptors", "Project dependency map for the inter-project resolver.", DTask)
val autoUpdate = SettingKey[Boolean]("auto-update", "<unimplemented>", Invisible)
val retrieveManaged = SettingKey[Boolean]("retrieve-managed", "If true, enables retrieving dependencies to the current build. Otherwise, dependencies are used directly from the cache.", BSetting)
val retrieveManagedSync = SettingKey[Boolean]("retrieve-managed-sync", "If true, enables synchronizing the dependencies retrieved to the current build by removed unneeded files.", BSetting)
val configurationsToRetrieve = SettingKey[Option[Seq[ConfigRef]]]("configurations-to-retrieve", "An optional set of configurations from which to retrieve dependencies if retrieveManaged is set to true", BSetting)
val managedDirectory = SettingKey[File]("managed-directory", "Directory to which managed dependencies are retrieved.", BSetting)
val classpathTypes = SettingKey[Set[String]]("classpath-types", "Artifact types that are included on the classpath.", BSetting)
val publishArtifact = SettingKey[Boolean]("publish-artifact", "Enables (true) or disables (false) publishing an artifact.", AMinusSetting)
val packagedArtifact = TaskKey[(Artifact, File)]("packaged-artifact", "Generates a packaged artifact, returning the Artifact and the produced File.", CTask)
val checksums = SettingKey[Seq[String]]("checksums", "The list of checksums to generate and to verify for dependencies.", BSetting)
val forceUpdatePeriod = SettingKey[Option[FiniteDuration]]("force-update-period", "Duration after which to force a full update to occur", CSetting)
val moduleName = settingKey[String]("The name of the current module, used for dependency management.").withRank(BSetting)
val version = settingKey[String]("The version/revision of the current module.").withRank(APlusSetting)
val isSnapshot = settingKey[Boolean]("True if the version of the project is a snapshot version.").withRank(BPlusSetting)
val moduleID = settingKey[ModuleID]("A dependency management descriptor. This is currently used for associating a ModuleID with a classpath entry.").withRank(BPlusSetting)
val projectID = settingKey[ModuleID]("The dependency management descriptor for the current module.").withRank(BMinusSetting)
val overrideBuildResolvers = settingKey[Boolean]("Whether or not all the build resolvers should be overridden with what's defined from the launcher.").withRank(BMinusSetting)
val bootResolvers = taskKey[Option[Seq[Resolver]]]("The resolvers used by the sbt launcher.").withRank(BMinusSetting)
val appResolvers = settingKey[Option[Seq[Resolver]]]("The resolvers configured for this application by the sbt launcher.").withRank(BMinusSetting)
val externalResolvers = taskKey[Seq[Resolver]]("The external resolvers for automatically managed dependencies.").withRank(BMinusSetting)
val resolvers = settingKey[Seq[Resolver]]("The user-defined additional resolvers for automatically managed dependencies.").withRank(BMinusTask)
val projectResolver = taskKey[Resolver]("Resolver that handles inter-project dependencies.").withRank(DTask)
val fullResolvers = taskKey[Seq[Resolver]]("Combines the project resolver, default resolvers, and user-defined resolvers.").withRank(CTask)
val otherResolvers = taskKey[Seq[Resolver]]("Resolvers not included in the main resolver chain, such as those in module configurations.").withRank(CSetting)
val useJCenter = settingKey[Boolean]("Use JCenter as the default repository.").withRank(BSetting)
val moduleConfigurations = settingKey[Seq[ModuleConfiguration]]("Defines module configurations, which override resolvers on a per-module basis.").withRank(BMinusSetting)
val retrievePattern = settingKey[String]("Pattern used to retrieve managed dependencies to the current build.").withRank(DSetting)
val retrieveConfiguration = settingKey[Option[RetrieveConfiguration]]("Configures retrieving dependencies to the current build.").withRank(DSetting)
val offline = settingKey[Boolean]("Configures sbt to work without a network connection where possible.").withRank(ASetting)
val ivyPaths = settingKey[IvyPaths]("Configures paths used by Ivy for dependency management.").withRank(DSetting)
val dependencyCacheDirectory = taskKey[File]("The base directory for cached dependencies.").withRank(DTask)
val libraryDependencies = settingKey[Seq[ModuleID]]("Declares managed dependencies.").withRank(APlusSetting)
val dependencyOverrides = settingKey[Seq[ModuleID]]("Declares managed dependency overrides.").withRank(BSetting)
val excludeDependencies = settingKey[Seq[InclExclRule]]("Declares managed dependency exclusions.").withRank(BSetting)
val allDependencies = taskKey[Seq[ModuleID]]("Inter-project and library dependencies.").withRank(CTask)
val projectDependencies = taskKey[Seq[ModuleID]]("Inter-project dependencies.").withRank(DTask)
val ivyXML = settingKey[NodeSeq]("Defines inline Ivy XML for configuring dependency management.").withRank(BSetting)
val scalaModuleInfo = settingKey[Option[ScalaModuleInfo]]("Configures how Scala dependencies are checked, filtered, and injected.").withRank(CSetting)
val ivyValidate = settingKey[Boolean]("Enables/disables Ivy validation of module metadata.").withRank(BSetting)
val ivyLoggingLevel = settingKey[UpdateLogging]("The logging level for updating.").withRank(BSetting)
val publishTo = taskKey[Option[Resolver]]("The resolver to publish to.").withRank(ASetting)
val artifacts = settingKey[Seq[Artifact]]("The artifact definitions for the current module. Must be consistent with " + packagedArtifacts.key.label + ".").withRank(BSetting)
val projectDescriptors = taskKey[Map[ModuleRevisionId, ModuleDescriptor]]("Project dependency map for the inter-project resolver.").withRank(DTask)
val autoUpdate = settingKey[Boolean]("<unimplemented>").withRank(Invisible)
val retrieveManaged = settingKey[Boolean]("If true, enables retrieving dependencies to the current build. Otherwise, dependencies are used directly from the cache.").withRank(BSetting)
val retrieveManagedSync = settingKey[Boolean]("If true, enables synchronizing the dependencies retrieved to the current build by removed unneeded files.").withRank(BSetting)
val configurationsToRetrieve = settingKey[Option[Seq[ConfigRef]]]("An optional set of configurations from which to retrieve dependencies if retrieveManaged is set to true").withRank(BSetting)
val managedDirectory = settingKey[File]("Directory to which managed dependencies are retrieved.").withRank(BSetting)
val classpathTypes = settingKey[Set[String]]("Artifact types that are included on the classpath.").withRank(BSetting)
val publishArtifact = settingKey[Boolean]("Enables (true) or disables (false) publishing an artifact.").withRank(AMinusSetting)
val packagedArtifact = taskKey[(Artifact, File)]("Generates a packaged artifact, returning the Artifact and the produced File.").withRank(CTask)
val checksums = settingKey[Seq[String]]("The list of checksums to generate and to verify for dependencies.").withRank(BSetting)
val forceUpdatePeriod = settingKey[Option[FiniteDuration]]("Duration after which to force a full update to occur").withRank(CSetting)
val classifiersModule = TaskKey[GetClassifiersModule]("classifiers-module", rank = CTask)
val compatibilityWarningOptions = SettingKey[CompatibilityWarningOptions]("compatibility-warning", "Configures warnings around Maven incompatibility.", CSetting)
val conflictWarning = SettingKey[ConflictWarning]("conflict-warning", "Configures warnings for conflicts in dependency management.", CSetting)
val conflictManager = SettingKey[ConflictManager]("conflict-manager", "Selects the conflict manager to use for dependency management.", CSetting)
val autoScalaLibrary = SettingKey[Boolean]("auto-scala-library", "Adds a dependency on scala-library if true.", ASetting)
val managedScalaInstance = SettingKey[Boolean]("managed-scala-instance", "Automatically obtains Scala tools as managed dependencies if true.", BSetting)
val sbtResolver = SettingKey[Resolver]("sbt-resolver", "Provides a resolver for obtaining sbt as a dependency.", BMinusSetting)
val sbtDependency = SettingKey[ModuleID]("sbt-dependency", "Provides a definition for declaring the current version of sbt.", BMinusSetting)
val sbtVersion = SettingKey[String]("sbt-version", "Provides the version of sbt. This setting should not be modified.", AMinusSetting)
val sbtBinaryVersion = SettingKey[String]("sbt-binary-version", "Defines the binary compatibility version substring.", BPlusSetting)
val skip = TaskKey[Boolean]("skip", "For tasks that support it (currently only 'compile' and 'update'), setting skip to true will force the task to not to do its work. This exact semantics may vary by task.", BSetting)
val templateResolverInfos = SettingKey[Seq[TemplateResolverInfo]]("templateResolverInfos", "Template resolvers used for 'new'.", BSetting)
val interactionService = TaskKey[InteractionService]("interactionService", "Service used to ask for user input through the current user interface(s).", CTask)
val classifiersModule = taskKey[GetClassifiersModule]("classifiers-module").withRank(CTask)
val compatibilityWarningOptions = settingKey[CompatibilityWarningOptions]("Configures warnings around Maven incompatibility.").withRank(CSetting)
val conflictWarning = settingKey[ConflictWarning]("Configures warnings for conflicts in dependency management.").withRank(CSetting)
val conflictManager = settingKey[ConflictManager]("Selects the conflict manager to use for dependency management.").withRank(CSetting)
val autoScalaLibrary = settingKey[Boolean]("Adds a dependency on scala-library if true.").withRank(ASetting)
val managedScalaInstance = settingKey[Boolean]("Automatically obtains Scala tools as managed dependencies if true.").withRank(BSetting)
val sbtResolver = settingKey[Resolver]("Provides a resolver for obtaining sbt as a dependency.").withRank(BMinusSetting)
val sbtDependency = settingKey[ModuleID]("Provides a definition for declaring the current version of sbt.").withRank(BMinusSetting)
val sbtVersion = settingKey[String]("Provides the version of sbt. This setting should not be modified.").withRank(AMinusSetting)
val sbtBinaryVersion = settingKey[String]("Defines the binary compatibility version substring.").withRank(BPlusSetting)
val skip = taskKey[Boolean]("For tasks that support it (currently only 'compile' and 'update'), setting skip to true will force the task to not to do its work. This exact semantics may vary by task.").withRank(BSetting)
val templateResolverInfos = settingKey[Seq[TemplateResolverInfo]]("Template resolvers used for 'new'.").withRank(BSetting)
val interactionService = taskKey[InteractionService]("Service used to ask for user input through the current user interface(s).").withRank(CTask)
// special
val sessionVars = AttributeKey[SessionVar.Map]("session-vars", "Bindings that exist for the duration of the session.", Invisible)
val parallelExecution = SettingKey[Boolean]("parallel-execution", "Enables (true) or disables (false) parallel execution of tasks.", BMinusSetting)
val tags = SettingKey[Seq[(Tags.Tag, Int)]]("tags", ConcurrentRestrictions.tagsKey.label, BSetting)
val concurrentRestrictions = SettingKey[Seq[Tags.Rule]]("concurrent-restrictions", "Rules describing restrictions on concurrent task execution.", BSetting)
val cancelable = SettingKey[Boolean]("cancelable", "Enables (true) or disables (false) the ability to interrupt task execution with CTRL+C.", BMinusSetting)
val forcegc = SettingKey[Boolean]("forcegc", "Enables (true) or disables (false) forcing garbage collection after task run when needed.", BMinusSetting)
val minForcegcInterval = SettingKey[Duration]("min-forcegc-interval", "Minimal interval to check for forcing garbage collection.")
val sessionVars = AttributeKey[SessionVar.Map]("sessionVars", "Bindings that exist for the duration of the session.", Invisible)
val parallelExecution = settingKey[Boolean]("Enables (true) or disables (false) parallel execution of tasks.").withRank(BMinusSetting)
val tags = settingKey[Seq[(Tags.Tag, Int)]](ConcurrentRestrictions.tagsKey.description.getOrElse("tags")).withRank(BSetting)
val concurrentRestrictions = settingKey[Seq[Tags.Rule]]("Rules describing restrictions on concurrent task execution.").withRank(BSetting)
val cancelable = settingKey[Boolean]("Enables (true) or disables (false) the ability to interrupt task execution with CTRL+C.").withRank(BMinusSetting)
val forcegc = settingKey[Boolean]("Enables (true) or disables (false) forcing garbage collection after task run when needed.").withRank(BMinusSetting)
val minForcegcInterval = settingKey[Duration]("Minimal interval to check for forcing garbage collection.")
val settingsData = std.FullInstance.settingsData
val streams = TaskKey[TaskStreams]("streams", "Provides streams for logging and persisting data.", DTask)
val streams = taskKey[TaskStreams]("Provides streams for logging and persisting data.").withRank(DTask)
val taskDefinitionKey = Def.taskDefinitionKey
val (executionRoots, dummyRoots) = Def.dummy[Seq[ScopedKey[_]]]("execution-roots", "The list of root tasks for this task execution. Roots are the top-level tasks that were directly requested to be run.")
val (executionRoots, dummyRoots) = Def.dummy[Seq[ScopedKey[_]]]("executionRoots", "The list of root tasks for this task execution. Roots are the top-level tasks that were directly requested to be run.")
val state = Def.stateKey
val streamsManager = Def.streamsManagerKey
val stateStreams = AttributeKey[Streams]("streams-manager", "Streams manager, which provides streams for different contexts. Setting this on State will override the default Streams implementation.")
val stateStreams = AttributeKey[Streams]("stateStreams", "Streams manager, which provides streams for different contexts. Setting this on State will override the default Streams implementation.")
val resolvedScoped = Def.resolvedScoped
val pluginData = TaskKey[PluginData]("plugin-data", "Information from the plugin build needed in the main build definition.", DTask)
val globalPluginUpdate = TaskKey[UpdateReport]("global-plugin-update", "A hook to get the UpdateReport of the global plugin.", DTask)
val pluginData = taskKey[PluginData]("Information from the plugin build needed in the main build definition.").withRank(DTask)
val globalPluginUpdate = taskKey[UpdateReport]("A hook to get the UpdateReport of the global plugin.").withRank(DTask)
// wrapper to work around SI-2915
private[sbt] final class TaskProgress(val progress: ExecuteProgress[Task])
private[sbt] val executeProgress = SettingKey[State => TaskProgress]("executeProgress", "Experimental task execution listener.", DTask)
private[sbt] val taskCancelStrategy = SettingKey[State => TaskCancellationStrategy]("taskCancelStrategy", "Experimental task cancellation handler.", DTask)
private[sbt] val executeProgress = settingKey[State => TaskProgress]("Experimental task execution listener.").withRank(DTask)
private[sbt] val taskCancelStrategy = settingKey[State => TaskCancellationStrategy]("Experimental task cancellation handler.").withRank(DTask)
// Experimental in sbt 0.13.2 to enable grabbing semantic compile failures.
private[sbt] val compilerReporter = TaskKey[xsbti.Reporter]("compilerReporter", "Experimental hook to listen (or send) compilation failure messages.", DTask)
private[sbt] val compilerReporter = taskKey[xsbti.Reporter]("Experimental hook to listen (or send) compilation failure messages.").withRank(DTask)
val triggeredBy = Def.triggeredBy
val runBefore = Def.runBefore

View File

@ -15,6 +15,9 @@ import Def.ScopedKey
import sbt.internal.Load
import sbt.internal.CommandStrings._
import Cross.{ spacedFirst, requireSession }
import sbt.librarymanagement.Configurations._
import sbt.librarymanagement.VersionNumber
import Project.{ inConfig, inScope }
/**
* Module responsible for plugin cross building.
@ -42,7 +45,11 @@ private[sbt] object PluginCross {
val x = Project.extract(state)
import x._
state.log.info(s"Setting `sbtVersion in pluginCrossBuild` to $version")
val add = (sbtVersion in GlobalScope in pluginCrossBuild :== version) :: Nil
val add = List(sbtVersion in GlobalScope in pluginCrossBuild :== version) ++
List(scalaVersion := scalaVersionSetting.value) ++
inScope(GlobalScope.copy(project = Select(currentRef)))(Seq(
scalaVersion := scalaVersionSetting.value
))
val cleared = session.mergeSettings.filterNot(crossExclude)
val newStructure = Load.reapply(cleared ++ add, structure)
Project.setProject(session, newStructure, command :: state)
@ -74,4 +81,20 @@ private[sbt] object PluginCross {
else versions.map(PluginSwitchCommand + " " + _ + " " + command) ::: current ::: state
}
}
def scalaVersionSetting: Def.Initialize[String] = Def.setting {
val scalaV = scalaVersion.value
val sv = (sbtBinaryVersion in pluginCrossBuild).value
val isPlugin = sbtPlugin.value
if (isPlugin) scalaVersionFromSbtBinaryVersion(sv)
else scalaV
}
def scalaVersionFromSbtBinaryVersion(sv: String): String =
VersionNumber(sv) match {
case VersionNumber(Seq(0, 12, _*), _, _) => "2.9.2"
case VersionNumber(Seq(0, 13, _*), _, _) => "2.10.6"
case VersionNumber(Seq(1, 0, _*), _, _) => "2.12.3"
case _ => sys.error(s"Unsupported sbt binary version: $sv")
}
}

View File

@ -17,6 +17,7 @@ import java.util.Locale
import scala.sys.process.Process
import scala.util.control.NonFatal
import sbt.internal.util.Util
object Resolvers {
type Resolver = BuildLoader.Resolver
@ -125,20 +126,12 @@ object Resolvers {
private def normalized(uri: URI) = uri.copy(scheme = scheme)
}
private lazy val onWindows = {
val os = System.getenv("OSTYPE")
val isCygwin = (os != null) && os.toLowerCase(Locale.ENGLISH).contains("cygwin")
val isWindows =
System.getProperty("os.name", "").toLowerCase(Locale.ENGLISH).contains("windows")
isWindows && !isCygwin
}
def run(command: String*): Unit =
run(None, command: _*)
def run(cwd: Option[File], command: String*): Unit = {
val result = Process(
if (onWindows) "cmd" +: "/c" +: command
if (Util.isNonCygwinWindows) "cmd" +: "/c" +: command
else command,
cwd
) !;

View File

@ -114,11 +114,9 @@ private[sbt] object TemplateCommandUtil {
if (!(info.module.revision endsWith "-SNAPSHOT") && jars.nonEmpty) jars.toList
else {
IO.createDirectory(templateDirectory)
val m = lm.moduleDescriptor(info.module.withConfigurations(Some("component")),
Vector.empty,
scalaModuleInfo)
val m = lm.wrapDependencyInModule(info.module, scalaModuleInfo)
val xs = lm.retrieve(m, templateDirectory, log) match {
case Left(_) => ??? // FIXME
case Left(_) => sys.error(s"Retrieval of ${info.module} failed.")
case Right(files) => files.toList
}
xs

View File

@ -1,114 +0,0 @@
package sbt.internal
import sbt.internal.librarymanagement._
import sbt.internal.util.Types._
import sbt.internal.util.{ HList, HNil }
import sbt.io.Hash
import sbt.librarymanagement._
import sbt.librarymanagement.ivy._
import sbt.util._
import sbt.internal.util.HListFormats._
import sjsonnew.JsonFormat
object AltLibraryManagementCodec extends IvyLibraryManagementCodec {
type In0 = ModuleSettings :+: UpdateConfiguration :+: HNil
type In = IvyConfiguration :+: In0
object NullLogger extends sbt.internal.util.BasicLogger {
override def control(event: sbt.util.ControlEvent.Value, message: String): Unit = ()
override def log(level: Level.Value, message: String): Unit = ()
override def logAll(events: Seq[sbt.util.LogEvent]): Unit = ()
override def success(message: String): Unit = ()
override def trace(t: Throwable): Unit = ()
}
implicit val altRawRepositoryJsonFormat: JsonFormat[RawRepository] =
projectFormat(_.name, FakeRawRepository.create)
// Redefine to add RawRepository, and switch to unionFormat
override lazy implicit val ResolverFormat: JsonFormat[Resolver] =
unionFormat8[Resolver,
ChainedResolver,
MavenRepo,
MavenCache,
FileRepository,
URLRepository,
SshRepository,
SftpRepository,
RawRepository]
type InlineIvyHL = (Option[IvyPaths] :+: Vector[Resolver] :+: Vector[Resolver] :+: Vector[
ModuleConfiguration] :+: Vector[String] :+: Boolean :+: HNil)
def inlineIvyToHL(i: InlineIvyConfiguration): InlineIvyHL = (
i.paths :+: i.resolvers :+: i.otherResolvers :+: i.moduleConfigurations :+:
i.checksums :+: i.managedChecksums :+: HNil
)
type ExternalIvyHL = Option[PlainFileInfo] :+: Array[Byte] :+: HNil
def externalIvyToHL(e: ExternalIvyConfiguration): ExternalIvyHL =
e.baseDirectory.map(FileInfo.exists.apply) :+: e.uri
.map(Hash.contentsIfLocal)
.getOrElse(Array.empty) :+: HNil
// Redefine to use a subset of properties, that are serialisable
override lazy implicit val InlineIvyConfigurationFormat: JsonFormat[InlineIvyConfiguration] = {
def hlToInlineIvy(i: InlineIvyHL): InlineIvyConfiguration = {
val (paths :+: resolvers :+: otherResolvers :+: moduleConfigurations :+: checksums
:+: managedChecksums :+: HNil) = i
InlineIvyConfiguration()
.withPaths(paths)
.withResolvers(resolvers)
.withOtherResolvers(otherResolvers)
.withModuleConfigurations(moduleConfigurations)
.withManagedChecksums(managedChecksums)
.withChecksums(checksums)
}
projectFormat[InlineIvyConfiguration, InlineIvyHL](inlineIvyToHL, hlToInlineIvy)
}
// Redefine to use a subset of properties, that are serialisable
override lazy implicit val ExternalIvyConfigurationFormat
: JsonFormat[ExternalIvyConfiguration] = {
def hlToExternalIvy(e: ExternalIvyHL): ExternalIvyConfiguration = {
val baseDirectory :+: _ /* uri */ :+: HNil = e
ExternalIvyConfiguration(
None,
Some(NullLogger),
UpdateOptions(),
baseDirectory.map(_.file),
None /* the original uri is destroyed.. */,
Vector.empty
)
}
projectFormat[ExternalIvyConfiguration, ExternalIvyHL](externalIvyToHL, hlToExternalIvy)
}
// Redefine to switch to unionFormat
override implicit lazy val IvyConfigurationFormat: JsonFormat[IvyConfiguration] =
unionFormat2[IvyConfiguration, InlineIvyConfiguration, ExternalIvyConfiguration]
def forHNil[A <: HNil]: Equiv[A] = (_: A, _: A) => true
implicit val lnilEquiv1: Equiv[HNil] = forHNil[HNil]
implicit val lnilEquiv2: Equiv[HNil.type] = forHNil[HNil.type]
implicit def hconsEquiv[H, T <: HList](implicit he: Equiv[H], te: Equiv[T]): Equiv[H :+: T] =
(x: H :+: T, y: H :+: T) => he.equiv(x.head, y.head) && te.equiv(x.tail, y.tail)
implicit object altIvyConfigurationEquiv extends Equiv[IvyConfiguration] {
def equiv(x: IvyConfiguration, y: IvyConfiguration): Boolean = (x, y) match {
case (x: InlineIvyConfiguration, y: InlineIvyConfiguration) =>
implicitly[Equiv[InlineIvyHL]].equiv(inlineIvyToHL(x), inlineIvyToHL(y))
case (x: ExternalIvyConfiguration, y: ExternalIvyConfiguration) =>
implicitly[Equiv[ExternalIvyHL]].equiv(externalIvyToHL(x), externalIvyToHL(y))
case (x: Any, y: Any) => sys error s"Trying to compare ${x.getClass} with ${y.getClass}"
}
}
implicit object altInSingletonCache extends SingletonCache[In] {
def write(to: Output, value: In) = to.write(value)
def read(from: Input) = from.read[In]()
def equiv = hconsEquiv(altIvyConfigurationEquiv, implicitly[Equiv[In0]])
}
}

View File

@ -3,29 +3,25 @@ package sbt.internal
import java.io.File
import sbt.internal.librarymanagement._
import sbt.internal.util.HNil
import sbt.internal.util.Types._
import sbt.internal.util.HListFormats._
import sbt.librarymanagement._
import sbt.librarymanagement.ivy._
import sbt.librarymanagement.syntax._
import sbt.util.{ CacheStore, CacheStoreFactory, Logger, Tracked }
private[sbt] object LibraryManagement {
private type UpdateInputs = IvyConfiguration :+: ModuleSettings :+: UpdateConfiguration :+: HNil
private type UpdateInputs = (Long, ModuleSettings, UpdateConfiguration)
def cachedUpdate(
lm: DependencyResolution,
module: ModuleDescriptor,
cacheStoreFactory: CacheStoreFactory,
label: String,
module: IvySbt#Module,
updateConfig: UpdateConfiguration,
transform: UpdateReport => UpdateReport,
skip: Boolean,
force: Boolean,
depsUpdated: Boolean,
uwConfig: UnresolvedWarningConfiguration,
depDir: Option[File],
ewo: EvictionWarningOptions,
mavenStyle: Boolean,
compatWarning: CompatibilityWarningOptions,
@ -39,7 +35,7 @@ private[sbt] object LibraryManagement {
log.info(s"Updating $label...")
val reportOrUnresolved: Either[UnresolvedWarning, UpdateReport] =
//try {
IvyActions.updateEither(module, updateConfig, uwConfig, /*logicalClock, depDir,*/ log)
lm.update(module, updateConfig, uwConfig, log)
// } catch {
// case e: Throwable =>
// e.printStackTrace
@ -107,18 +103,19 @@ private[sbt] object LibraryManagement {
}
.apply(cachedResolve(updateInputs))
}
import AltLibraryManagementCodec._
import LibraryManagementCodec._
Tracked.inputChanged(cacheStoreFactory.make("inputs"))(doCachedResolve)
}
// Get the handler to use and feed it in the inputs
val ivyConfig = module.owner.configuration
// This is lm-engine specific input hashed into Long
val extraInputHash = module.extraInputHash
val settings = module.moduleSettings
val outStore = cacheStoreFactory.make("output")
val handler = if (skip && !force) skipResolve(outStore) else doResolve(outStore)
// Remove clock for caching purpose
val withoutClock = updateConfig.withLogicalClock(LogicalClock.unknown)
handler(ivyConfig :+: settings :+: withoutClock :+: HNil)
handler((extraInputHash, settings, withoutClock))
}
private[this] def fileUptodate(file: File, stamps: Map[File, Long]): Boolean =

View File

@ -12,6 +12,7 @@ This is the RC-1 release of sbt 1.0.
- sbt 0.12 style `Build` trait that was deprecated in sbt 0.13.12, is removed. Please [migrate to build.sbt](http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html#Migrating+from+the+Build+trait). Auto plugins and `Build` trait do not work well together, and its feature is now largely subsumed by multi-project build.sbt.
- sbt 0.12 style `Project(...)` constructor is restricted down to two parameters. This is because `settings` parameter does not work well with Auto Plugins. Use `project` instead.
- sbt 0.12 style key dependency operators `<<=`, `<+=`, `<++=` are removed. Please [migrate to :=, +=, and ++=](http://www.scala-sbt.org/0.13/docs/Migrating-from-sbt-012x.html#Migrating+simple+expressions). These operators have been sources of confusion for many users, and have long been removed from 0.13 docs, and have been formally deprecated since sbt 0.13.13.
- sbt 0.12 style tuple enrichement DSL, which was deprecated in sbt 0.13.13, is opt-in under `sbt.TupleSyntax`. [#2762][2762]/[#3291][3291] by [@dwijnand][@dwijnand]
- Zinc 1 drops support for Scala 2.9 and earlier. Scala 2.10 must use 2.10.2 and above. Scala 2.11 must use 2.11.2 and above. (latest patch releases are recommended)
- `config("tooling")` must be directly assigned to a *capitalized* `val`, like `val Tooling = config("tooling")`. This captures the lhs identifier into the configuration so we can use it from the shell later.
- Changes `publishTo` and `otherResolvers` from SettingKeys to TaskKeys. [#2059][2059]/[#2662][2662] by [@dwijnand][@dwijnand]
@ -39,6 +40,7 @@ This is the RC-1 release of sbt 1.0.
- sbt 1.0 renames `Global` as scope component to `Zero` to disambiguate from `GlobalScope`. [@eed3si9n][@eed3si9n]
- sbt 1.0 uses `ConfigRef` in places where `String` was used to reference configuration, such as `update.value.configuration(...)`. Pass in `Configuration`, which implicitly converts to `ConfigRef`.
- Changes `sourceArtifactTypes` and `docArtifactTypes` from `Set[String]` to `Seq[String]` settings.
- `Command.process(..)` is removed. Use `"cmd" :: state`.
The Scala Center is working with Lightbend to provide [an automatic migration tool][sbt-migration-rewrites].
@ -46,6 +48,10 @@ The Scala Center is working with Lightbend to provide [an automatic migration to
- New incremental compiler called Zinc 1. Details below.
- The interactive shell is adds network API. Details below.
- Library management API and parallel artifact download. See below.
- sbt 1.0's logging supports event logging. See below.
- Scala Center contributed static validation of `build.sbt`. See below
- Ports sbt-cross-building's `^` and `^^` commands for plugin cross building. See below.
#### Fixes
@ -61,8 +67,6 @@ The Scala Center is working with Lightbend to provide [an automatic migration to
- Scala Center contributed a Java-friendly Zinc API. This was a overhaul of the Zinc internal API for a good Scala integration with other build tools. [zinc#304][zinc304] by [@jvican][@jvican]
- Scala Center contributed a binary format for Zinc's internal storage. See below
- Scala Center contributed static validation of `build.sbt`. See below
- Library management API and parallel artifact download. See below.
- The startup log level is dropped to `-error` in script mode using `scalas`. [#840][840] by [@eed3si9n][@eed3si9n]
- Replace cross building support with sbt-doge. This allows builds with projects that have multiple different combinations of cross scala versions to be cross built correctly. The behaviour of ++ is changed so that it only updates the Scala version of projects that support that Scala version, but the Scala version can be post fixed with ! to force it to change for all projects. A -v argument has been added that prints verbose information about which projects are having their settings changed along with their cross scala versions. [#2613][2613] by [@jroper][@jroper]
- `ivyLoggingLevel` is dropped to `UpdateLogging.Quiet` when CI environment is detected. [@eed3si9n][@eed3si9n]
@ -70,7 +74,6 @@ The Scala Center is working with Lightbend to provide [an automatic migration to
- Add the ability to call `aggregate` for the current project inside a build sbt file. By [@xuwei-k][@xuwei-k]
- Add new global setting `asciiGraphWidth` that controls the maximum width of the ASCII graphs printed by commands like `inspect tree`. Default value corresponds to the previously hardcoded value of 40 characters. By [@RomanIakovlev][@RomanIakovlev].
- Revamped documentation for [Scopes](www.scala-sbt.org/0.13/docs/Scopes.html), and added [Scope Delegation](www.scala-sbt.org/0.13/docs/Scope-Delegation.html). [@eed3si9n][@eed3si9n]
- Ports sbt-cross-building's `^` and `^^` commands for plugin cross building. See below.
- Adds support for cross-versioned exclusions. [#1518][1518]/[lm#88][lm88] by [@jvican][@jvican]
- Adds new offline mode to the Ivy-based library management. [lm#92][lm92] by [@jvican][@jvican]
- A number of features related to dependency locking. See below.
@ -128,6 +131,22 @@ In March 2016, we [rebooted](http://eed3si9n.com/sbt-server-reboot) the "server"
Another related feature that was added is the `bgRun` task which, for example, enables a server process to be run in the background while you run tests against it.
### Event logging
sbt 1.0 introduces event logging implemented using Log4J 2 and sjson-new.
In addition to the regular String-based logging, you can now send case classes and Contraband-generated pseudo case classes to the logger:
def registerStringCodec[A: ShowLines: TypeTag]: Unit = ...
final def debugEvent[A: JsonFormat: TypeTag](event: => A): Unit = logEvent(Level.Debug, event)
final def infoEvent[A: JsonFormat: TypeTag](event: => A): Unit = logEvent(Level.Info, event)
final def warnEvent[A: JsonFormat: TypeTag](event: => A): Unit = logEvent(Level.Warn, event)
final def errorEvent[A: JsonFormat: TypeTag](event: => A): Unit = logEvent(Level.Error, event)
Various events such as `[success]` message are sent internally via event logging.
We are hoping that this mechanism can be used in conjunction with server so plugins and compilers can publish JSON events.
Since the logger uses Log4J 2 internally, we now provide SLF4J binding.
#### Static validation of build.sbt
sbt 1.0 prohibits `.value` calls inside the bodies of if expressions and anonymous functions in a task, `@sbtUnchecked` annotation can be used to override the check.
@ -245,11 +264,11 @@ that would should work together to allow dependency locking.
#### notes
- https://github.com/sbt/sbt/compare/v1.0.0-M6...1.0.x
- https://github.com/sbt/zinc/compare/v1.0.0-X16...v1.0.0-X20
- https://github.com/sbt/librarymanagement/compare/v1.0.0-X15...v1.0.0-X18
- https://github.com/sbt/util/compare/v1.0.0-M24...v1.0.0-M28
- https://github.com/sbt/io/compare/v1.0.0-M11...v1.0.0-M13
- https://github.com/sbt/sbt/compare/v1.0.0-RC2...v1.0.0-RC3
- https://github.com/sbt/zinc/compare/v1.0.0-X20...v1.0.0-RC3
- https://github.com/sbt/librarymanagement/compare/v1.0.0-X18...v1.0.0-RC3
- https://github.com/sbt/util/compare/v1.0.0-M28...v1.0.0-RC3
- https://github.com/sbt/io/compare/v1.0.0-M13...v1.0.0-RC3
[@eed3si9n]: https://github.com/eed3si9n
[@dwijnand]: http://github.com/dwijnand
@ -269,11 +288,14 @@ that would should work together to allow dependency locking.
[@Krever]: https://github.com/Krever
[@lukeindykiewicz]: https://github.com/lukeindykiewicz
[@gheine]: https://github.com/gheine
[@xuwei-k]: https://github.com/xuwei-k
[840]: https://github.com/sbt/sbt/issues/840
[2613]: https://github.com/sbt/sbt/pull/2613
[1911]: https://github.com/sbt/sbt/issues/1911
[2059]: https://github.com/sbt/sbt/issues/2059
[2662]: https://github.com/sbt/sbt/pull/2662
[2762]: https://github.com/sbt/sbt/issues/2762
[3291]: https://github.com/sbt/sbt/pull/3291
[util80]: https://github.com/sbt/util/pull/80
[3198]: https://github.com/sbt/sbt/issues/3198
[lm88]: https://github.com/sbt/librarymanagement/pull/88

View File

@ -1,9 +0,0 @@
### Changes with compatibility implications
- Moves the old, sbt 0.10 tuple enrichement DSL, which was deprecated in sbt 0.13.13, out of implicit scope and
to `sbt.TupleSyntax`, so that it is now an opt-in. [#2762][]/[#3291][] by [@dwijnand][]
[@dwijnand]: https://github.com/dwijnand
[#2762]: https://github.com/sbt/sbt/issues/2762
[#3291]: https://github.com/sbt/sbt/pull/3291

View File

@ -1,10 +0,0 @@
### Bug fixes
- Fixes test content logger dropping out, or displaying twice. [#3117][3117] by [@eed3si9n][@eed3si9n]
[@eed3si9n]: https://github.com/eed3si9n
[@dwijnand]: http://github.com/dwijnand
[@jvican]: https://github.com/jvican
[@Duhemm]: https://github.com/Duhemm
[3117]: https://github.com/sbt/sbt/issues/3117

View File

@ -8,14 +8,14 @@ object Dependencies {
val scala293 = "2.9.3"
val scala210 = "2.10.6"
val scala211 = "2.11.8"
val scala212 = "2.12.2"
val scala212 = "2.12.3"
val baseScalaVersion = scala212
// sbt modules
private val ioVersion = "1.0.0-M12"
private val utilVersion = "1.0.0-M28"
private val lmVersion = "1.0.0-X18"
private val zincVersion = "1.0.0-X20"
private val ioVersion = "1.0.0-RC3"
private val utilVersion = "1.0.0-RC3"
private val lmVersion = "1.0.0-RC3"
private val zincVersion = "1.0.0-RC3"
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
@ -113,4 +113,11 @@ object Dependencies {
val scalaXml = scala211Module("scala-xml", "1.0.6")
val scalaParsers = scala211Module("scala-parser-combinators", "1.0.5")
def log4jVersion = "2.8.1"
val log4jApi = "org.apache.logging.log4j" % "log4j-api" % log4jVersion
val log4jCore = "org.apache.logging.log4j" % "log4j-core" % log4jVersion
val log4jSlf4jImpl = "org.apache.logging.log4j" % "log4j-slf4j-impl" % log4jVersion
// specify all of log4j modules to prevent misalignment
val log4jDependencies = Vector(log4jApi, log4jCore, log4jSlf4jImpl)
}

View File

@ -5,7 +5,7 @@ import com.typesafe.sbt.site.SitePlugin.autoImport._
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._
import com.typesafe.sbt.SbtGit, SbtGit.{ git, GitKeys }
import Sxr.{ sxr, sxrConf }
import Sxr.{ sxr, SxrConf }
*/
object Docs {
@ -37,8 +37,8 @@ object Docs {
def siteIncludeSxr(prefix: String) = Def settings (
mappings in sxr := Path.allSubpaths(sxr.value).toSeq,
siteSubdirName in sxrConf := prefix,
addMappingsToSiteDir(mappings in sxr, siteSubdirName in sxrConf)
siteSubdirName in SxrConf := prefix,
addMappingsToSiteDir(mappings in sxr, siteSubdirName in SxrConf)
)
def synchLocalImpl = Def task {

View File

@ -1,6 +1,7 @@
import sbt._, Keys._
import sbt.internal.librarymanagement.PublishConfiguration
import sbt.librarymanagement.PublishConfiguration
import sbt.librarymanagement.ConfigRef
/** This local plugin provides ways of publishing just the binary jar. */
object PublishBinPlugin extends AutoPlugin {
@ -18,13 +19,24 @@ object PublishBinPlugin extends AutoPlugin {
override def projectSettings = Def settings (
publishLocalBin := Classpaths.publishTask(publishLocalBinConfig, deliverLocal).value,
publishLocalBinConfig := Classpaths.publishConfig(
(packagedArtifacts in publishLocalBin).value,
Some(deliverLocal.value),
(checksums in publishLocalBin).value,
logging = ivyLoggingLevel.value,
overwrite = isSnapshot.value
),
publishLocalBinConfig := {
val _ = deliverLocal.value
Classpaths.publishConfig(
publishMavenStyle.value,
deliverPattern(crossTarget.value),
if (isSnapshot.value) "integration" else "release",
ivyConfigurations.value.map(c => ConfigRef(c.name)).toVector,
(packagedArtifacts in publishLocalBin).value.toVector,
(checksums in publishLocalBin).value.toVector,
resolverName = "local",
logging = ivyLoggingLevel.value,
overwrite = isSnapshot.value)
},
packagedArtifacts in publishLocalBin := Classpaths.packaged(Seq(packageBin in Compile)).value
)
def deliverPattern(outputPath: File): String =
(outputPath / "[artifact]-[revision](-[classifier]).[ext]").absolutePath
}

View File

@ -1,6 +1,7 @@
import sbt.io.Path._
import sbt._
import Keys._
import sbt.io.CopyOptions
object SbtLauncherPlugin extends AutoPlugin {
override def requires = plugins.IvyPlugin
@ -40,7 +41,7 @@ object SbtLauncherPlugin extends AutoPlugin {
// TODO - Check if we should rebuild the jar or not....
IO.withTemporaryDirectory { dir =>
IO.unzip(jar, dir)
IO.copy(overrides.map({ case (n, f) => (f, dir / n) }), overwrite = true)
IO.copy(overrides.map({ case (n, f) => (f, dir / n) }), CopyOptions().withOverwrite(true))
// TODO - is the ok for creating a jar?
IO.zip((dir.allPaths --- dir) pair relativeTo(dir), target)
}

View File

@ -2,22 +2,20 @@ import sbt._
import Keys._
import Scope.ThisScope
import sbt.librarymanagement.syntax._
import sbt.internal.inc.RawCompiler
object Sxr {
val sxrConf = config("sxr").hide
val SxrConf = config("sxr").hide
val sxr = TaskKey[File]("sxr")
val sourceDirectories = TaskKey[Seq[File]]("sxr-source-directories")
lazy val settings: Seq[Setting[_]] = inTask(sxr)(inSxrSettings) ++ baseSettings
def baseSettings = Seq(
libraryDependencies += "org.scala-sbt.sxr" % "sxr_2.10" % "0.3.0" % sxrConf.name
libraryDependencies += "org.scala-sbt.sxr" % "sxr_2.10" % "0.3.0" % SxrConf
)
def inSxrSettings = Seq(
managedClasspath := update.value.matching(configurationFilter(sxrConf.name)).classpath,
managedClasspath := update.value.matching(configurationFilter(SxrConf.name)).classpath,
scalacOptions += "-P:sxr:base-directory:" + sourceDirectories.value.absString,
scalacOptions += "-Xplugin:" + managedClasspath.value.files
.filter(_.getName.contains("sxr"))

View File

@ -1 +1 @@
sbt.version=1.0.0-M6
sbt.version=1.0.0-RC3

View File

@ -1,12 +1,13 @@
scalaVersion := "2.12.2"
scalaVersion := "2.12.3"
scalacOptions ++= Seq("-feature", "-language:postfixOps")
// addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.14")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.1.17")
// addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.0")
// addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.2")
// addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
// addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.2.0")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.4.0")
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.0-M9")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1")
addSbtPlugin("org.scala-sbt" % "sbt-contraband" % "0.3.0")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0-M1")
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.3")
// addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.3")

View File

@ -4,9 +4,9 @@
package sbt
import java.io.File
import java.util.Locale
import scala.sys.process.Process
import OutputStrategy._
import sbt.internal.util.Util
/**
* Represents a command that can be forked.
@ -80,15 +80,13 @@ object Fork {
private[this] val MaxConcatenatedOptionLength = 5000
private def fitClasspath(options: Seq[String]): (Option[String], Seq[String]) =
if (isWindows && optionsTooLong(options))
if (Util.isWindows && optionsTooLong(options))
convertClasspathToEnv(options)
else
(None, options)
private[this] def optionsTooLong(options: Seq[String]): Boolean =
options.mkString(" ").length > MaxConcatenatedOptionLength
private[this] val isWindows: Boolean =
System.getProperty("os.name").toLowerCase(Locale.ENGLISH).contains("windows")
private[this] def convertClasspathToEnv(options: Seq[String]): (Option[String], Seq[String]) = {
val (preCP, cpAndPost) = options.span(opt => !isClasspathOption(opt))
val postCP = cpAndPost.drop(2)

View File

@ -8,7 +8,8 @@ trait Import {
type URI = java.net.URI
type URL = java.net.URL
implicit def Seq2Vector[T](s: Seq[T]): Vector[T] = s.toVector
@deprecated("Will be removed in sbt 2", "1.0.0-RC3")
def Seq2Vector[T](s: Seq[T]): Vector[T] = s.toVector
// sbt
val StdoutOutput = sbt.OutputStrategy.StdoutOutput
@ -27,6 +28,8 @@ trait Import {
// sbt.io
val AllPassFilter = sbt.io.AllPassFilter
val CopyOptions = sbt.io.CopyOptions
type CopyOptions = sbt.io.CopyOptions
val DirectoryFilter = sbt.io.DirectoryFilter
type ExactFilter = sbt.io.ExactFilter
val ExistsFileFilter = sbt.io.ExistsFileFilter
@ -229,6 +232,8 @@ trait Import {
type ChainedResolver = sbt.librarymanagement.ChainedResolver
val CircularDependencyLevel = sbt.librarymanagement.ivy.CircularDependencyLevel
type CircularDependencyLevel = sbt.librarymanagement.ivy.CircularDependencyLevel
val ConfigRef = sbt.librarymanagement.ConfigRef
type ConfigRef = sbt.librarymanagement.ConfigRef
val Configuration = sbt.librarymanagement.Configuration
type Configuration = sbt.librarymanagement.Configuration
val ConfigurationReport = sbt.librarymanagement.ConfigurationReport
@ -294,6 +299,8 @@ trait Import {
val Patterns = sbt.librarymanagement.Patterns
type Patterns = sbt.librarymanagement.Patterns
type PatternsBasedRepository = sbt.librarymanagement.PatternsBasedRepository
val PublishConfiguration = sbt.librarymanagement.PublishConfiguration
type PublishConfiguration = sbt.librarymanagement.PublishConfiguration
type RawRepository = sbt.librarymanagement.RawRepository
val Resolver = sbt.librarymanagement.Resolver
type Resolver = sbt.librarymanagement.Resolver

View File

@ -34,38 +34,33 @@ lazy val root = (project in file("."))
val cacheStoreFactory = s.cacheStoreFactory sub updateCacheName.value
val module = ivyModule.value
val updateConfig = updateConfiguration.value
val ivyConfiguration0 = module.owner.configuration
val extraInputHash0 = module.extraInputHash
val moduleSettings0 = module.moduleSettings
val inline0 = moduleSettings0 match { case x: InlineConfiguration => x }
// Remove clock for caching purpose
val updateConfig0 = updateConfig.withLogicalClock(LogicalClock.unknown)
import sbt.librarymanagement.ivy.IvyConfiguration
import sbt.librarymanagement.{ ModuleSettings, UpdateConfiguration }
import sbt.internal.util.HListFormats._
import sbt.librarymanagement.{ ModuleSettings, UpdateConfiguration, LibraryManagementCodec }
type In = (Long, ModuleSettings, UpdateConfiguration)
type In = IvyConfiguration :+: ModuleSettings :+: UpdateConfiguration :+: HNil
import sbt.util.CacheImplicits._
import sbt.internal.util.HListFormats._
import sbt.internal.AltLibraryManagementCodec._
import LibraryManagementCodec._
val f: In => Unit =
Tracked.inputChanged(cacheStoreFactory make "inputs") { (inChanged: Boolean, in: In) =>
val ivyConfiguration1 = in.head
val moduleSettings1 = in.tail.head
val extraInputHash1 = in._1
val moduleSettings1 = in._2
val inline1 = moduleSettings1 match { case x: InlineConfiguration => x }
val updateConfig1 = in.tail.tail.head
val updateConfig1 = in._3
if (inChanged) {
sys.error(s"""
ivyConfiguration1 == ivyConfiguration0: ${ivyConfiguration1 == ivyConfiguration0}
extraInputHash1 == extraInputHash0: ${extraInputHash1 == extraInputHash0}
ivyConfiguration1:
$ivyConfiguration1
extraInputHash1:
$extraInputHash1
ivyConfiguration0
$ivyConfiguration0
extraInputHash0
$extraInputHash0
-----
inline1 == inline0: ${inline1 == inline0}
@ -86,7 +81,7 @@ $updateConfig0
}
}
f(ivyConfiguration0 :+: (inline0: ModuleSettings) :+: updateConfig0 :+: HNil)
f((extraInputHash0, (inline0: ModuleSettings), updateConfig0))
},
// https://github.com/sbt/sbt/issues/3226

View File

@ -1,5 +1,9 @@
val baseSbt = "1.0"
val buildCrossList = List("2.10.6", "2.11.11", "2.12.2")
scalaVersion in ThisBuild := "2.12.2"
crossScalaVersions in ThisBuild := buildCrossList
lazy val root = (project in file("."))
.settings(
sbtPlugin := true,
@ -11,6 +15,12 @@ lazy val root = (project in file("."))
assert(sv == "2.12", s"Wrong e:scalaVersion: $sv")
assert(scalaBinaryVersion.value == "2.12", s"Wrong Scala binary version: ${scalaBinaryVersion.value}")
assert(crossV startsWith "1.0.", s"Wrong `sbtVersion in pluginCrossBuild`: $crossV")
// crossScalaVersions in app should not be affected
val appCrossScalaVersions = (crossScalaVersions in app).value.toList
val appScalaVersion = (scalaVersion in app).value
assert(appCrossScalaVersions == buildCrossList, s"Wrong `crossScalaVersions in app`: $appCrossScalaVersions")
assert(appScalaVersion startsWith "2.12", s"Wrong `scalaVersion in app`: $appScalaVersion")
},
TaskKey[Unit]("check2") := {
@ -20,5 +30,13 @@ lazy val root = (project in file("."))
assert(sv == "2.10", s"Wrong e:scalaVersion: $sv")
assert(scalaBinaryVersion.value == "2.10", s"Wrong Scala binary version: ${scalaBinaryVersion.value}")
assert(crossV startsWith "0.13", s"Wrong `sbtVersion in pluginCrossBuild`: $crossV")
// ^^ should not affect app's crossScalaVersions
val appCrossScalaVersions = (crossScalaVersions in app).value.toList
val appScalaVersion = (scalaVersion in app).value
assert(appCrossScalaVersions == buildCrossList, s"Wrong `crossScalaVersions in app`: $appCrossScalaVersions")
assert(appScalaVersion startsWith "2.12", s"Wrong `scalaVersion in app`: $appScalaVersion")
}
)
lazy val app = (project in file("app"))

View File

@ -9,7 +9,7 @@ import sbt.internal.util.complete.{ Parser, DefaultParsers }
import sbt.internal.inc.classpath.ClasspathUtilities
import sbt.internal.inc.ModuleUtilities
import java.lang.reflect.Method
import sbt.librarymanagement.CrossVersion.binarySbtVersion
import sbt.librarymanagement.CrossVersion.partialVersion
object ScriptedPlugin extends AutoPlugin {
override def requires = plugins.JvmPlugin
@ -36,20 +36,18 @@ object ScriptedPlugin extends AutoPlugin {
scriptedSbt := (sbtVersion in pluginCrossBuild).value,
sbtLauncher := getJars(ScriptedLaunchConf).map(_.get.head).value,
sbtTestDirectory := sourceDirectory.value / "sbt-test",
libraryDependencies ++= {
binarySbtVersion(scriptedSbt.value) match {
case "0.13" =>
Seq(
"org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % ScriptedConf.toString,
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf.toString
)
case sv if sv startsWith "1.0." =>
Seq(
"org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % ScriptedConf.toString,
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf.toString
)
}
},
libraryDependencies ++= (partialVersion(scriptedSbt.value) match {
case Some((0, 13)) =>
Seq(
"org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % ScriptedConf,
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf
)
case Some((1, _)) =>
Seq(
"org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % ScriptedConf,
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf
)
}),
scriptedBufferLog := true,
scriptedClasspath := getJars(ScriptedConf).value,
scriptedTests := scriptedTestsTask.value,

View File

@ -6,3 +6,6 @@
{ "type": "ExecCommand", "commandLine": "compile" }
```
```json
{ "type": "ExecCommand", "commandLine": "eval Thread.sleep(10000)" }
```