mirror of https://github.com/sbt/sbt.git
Merge pull request #3407 from sbt/1.0.0
Merge the 1.0.0 branch into 1.x
This commit is contained in:
commit
6ea9dab99e
|
|
@ -16,8 +16,9 @@ matrix:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- SBT_CMD=";test:compile;scalafmt::test;test:scalafmt::test;mainSettingsProj/test;safeUnitTests;otherUnitTests"
|
# 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"
|
# - 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 actions/*"
|
||||||
- SBT_CMD="scripted apiinfo/* compiler-project/* ivy-deps-management/*"
|
- SBT_CMD="scripted apiinfo/* compiler-project/* ivy-deps-management/*"
|
||||||
- SBT_CMD="scripted dependency-management/*1of4"
|
- SBT_CMD="scripted dependency-management/*1of4"
|
||||||
|
|
|
||||||
78
build.sbt
78
build.sbt
|
|
@ -32,9 +32,9 @@ def buildLevelSettings: Seq[Setting[_]] =
|
||||||
homepage := Some(url("https://github.com/sbt/sbt")),
|
homepage := Some(url("https://github.com/sbt/sbt")),
|
||||||
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")),
|
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")),
|
||||||
resolvers += Resolver.mavenLocal,
|
resolvers += Resolver.mavenLocal,
|
||||||
scalafmtOnCompile := true,
|
// scalafmtOnCompile := true,
|
||||||
// scalafmtVersion 1.0.0-RC3 has regression
|
// scalafmtVersion 1.0.0-RC3 has regression
|
||||||
scalafmtVersion := "0.6.8"
|
// scalafmtVersion := "0.6.8"
|
||||||
))
|
))
|
||||||
|
|
||||||
def commonSettings: Seq[Setting[_]] =
|
def commonSettings: Seq[Setting[_]] =
|
||||||
|
|
@ -51,13 +51,6 @@ def commonSettings: Seq[Setting[_]] =
|
||||||
bintrayPackage := (bintrayPackage in ThisBuild).value,
|
bintrayPackage := (bintrayPackage in ThisBuild).value,
|
||||||
bintrayRepository := (bintrayRepository in ThisBuild).value,
|
bintrayRepository := (bintrayRepository in ThisBuild).value,
|
||||||
publishArtifact in Test := false,
|
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 compile := true,
|
||||||
fork in run := true
|
fork in run := true
|
||||||
) flatMap (_.settings)
|
) flatMap (_.settings)
|
||||||
|
|
@ -72,10 +65,16 @@ def baseSettings: Seq[Setting[_]] =
|
||||||
def testedBaseSettings: Seq[Setting[_]] =
|
def testedBaseSettings: Seq[Setting[_]] =
|
||||||
baseSettings ++ testDependencies
|
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("."))
|
lazy val sbtRoot: Project = (project in file("."))
|
||||||
.enablePlugins(ScriptedPlugin) // , SiteScaladocPlugin, GhpagesPlugin)
|
.enablePlugins(ScriptedPlugin) // , SiteScaladocPlugin, GhpagesPlugin)
|
||||||
.configs(Sxr.sxrConf)
|
.configs(Sxr.SxrConf)
|
||||||
.aggregateSeq(nonRoots)
|
.aggregate(nonRoots: _*)
|
||||||
.settings(
|
.settings(
|
||||||
buildLevelSettings,
|
buildLevelSettings,
|
||||||
minimalSettings,
|
minimalSettings,
|
||||||
|
|
@ -117,6 +116,7 @@ lazy val bundledLauncherProj =
|
||||||
description := "sbt application launcher",
|
description := "sbt application launcher",
|
||||||
autoScalaLibrary := false,
|
autoScalaLibrary := false,
|
||||||
crossPaths := false,
|
crossPaths := false,
|
||||||
|
// mimaSettings, // TODO: Configure MiMa, deal with Proguard
|
||||||
publish := Release.deployLauncher.value,
|
publish := Release.deployLauncher.value,
|
||||||
publishLauncher := Release.deployLauncher.value,
|
publishLauncher := Release.deployLauncher.value,
|
||||||
packageBin in Compile := sbtLaunchJar.value
|
packageBin in Compile := sbtLaunchJar.value
|
||||||
|
|
@ -129,7 +129,8 @@ val collectionProj = (project in file("internal") / "util-collection")
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
Util.keywordsSettings,
|
Util.keywordsSettings,
|
||||||
name := "Collections",
|
name := "Collections",
|
||||||
libraryDependencies ++= Seq(sjsonNewScalaJson.value)
|
libraryDependencies ++= Seq(sjsonNewScalaJson.value),
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtUtilPosition)
|
.configure(addSbtUtilPosition)
|
||||||
|
|
||||||
|
|
@ -139,7 +140,8 @@ val completeProj = (project in file("internal") / "util-complete")
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Completion",
|
name := "Completion",
|
||||||
libraryDependencies += jline
|
libraryDependencies += jline,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtIO, addSbtUtilControl)
|
.configure(addSbtIO, addSbtUtilControl)
|
||||||
|
|
||||||
|
|
@ -148,7 +150,8 @@ val logicProj = (project in file("internal") / "util-logic")
|
||||||
.dependsOn(collectionProj)
|
.dependsOn(collectionProj)
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Logic"
|
name := "Logic",
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtUtilRelation)
|
.configure(addSbtUtilRelation)
|
||||||
|
|
||||||
|
|
@ -165,7 +168,8 @@ lazy val testingProj = (project in file("testing"))
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
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",
|
||||||
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats
|
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtIO, addSbtCompilerClasspath, addSbtUtilLogging)
|
.configure(addSbtIO, addSbtCompilerClasspath, addSbtUtilLogging)
|
||||||
|
|
||||||
|
|
@ -177,7 +181,8 @@ lazy val testAgentProj = (project in file("testing") / "agent")
|
||||||
crossPaths := false,
|
crossPaths := false,
|
||||||
autoScalaLibrary := false,
|
autoScalaLibrary := false,
|
||||||
name := "Test Agent",
|
name := "Test Agent",
|
||||||
libraryDependencies += testInterface
|
libraryDependencies += testInterface,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Basic task engine
|
// Basic task engine
|
||||||
|
|
@ -185,7 +190,8 @@ lazy val taskProj = (project in file("tasks"))
|
||||||
.dependsOn(collectionProj)
|
.dependsOn(collectionProj)
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Tasks"
|
name := "Tasks",
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtUtilControl)
|
.configure(addSbtUtilControl)
|
||||||
|
|
||||||
|
|
@ -196,19 +202,22 @@ lazy val stdTaskProj = (project in file("tasks-standard"))
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Task System",
|
name := "Task System",
|
||||||
testExclusive
|
testExclusive,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilCache)
|
.configure(addSbtIO, addSbtUtilLogging, addSbtUtilCache)
|
||||||
|
|
||||||
// Embedded Scala code runner
|
// Embedded Scala code runner
|
||||||
lazy val runProj = (project in file("run"))
|
lazy val runProj = (project in file("run"))
|
||||||
.enablePlugins(ContrabandPlugin)
|
.enablePlugins(ContrabandPlugin)
|
||||||
|
.dependsOn(collectionProj)
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Run",
|
name := "Run",
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
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)
|
.configure(addSbtIO, addSbtUtilLogging, addSbtCompilerClasspath)
|
||||||
|
|
||||||
|
|
@ -217,7 +226,8 @@ lazy val scriptedSbtProj = (project in scriptedPath / "sbt")
|
||||||
.settings(
|
.settings(
|
||||||
baseSettings,
|
baseSettings,
|
||||||
name := "Scripted sbt",
|
name := "Scripted sbt",
|
||||||
libraryDependencies ++= Seq(launcherInterface % "provided")
|
libraryDependencies ++= Seq(launcherInterface % "provided"),
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtIO, addSbtUtilLogging, addSbtCompilerInterface, addSbtUtilScripted)
|
.configure(addSbtIO, addSbtUtilLogging, addSbtCompilerInterface, addSbtUtilScripted)
|
||||||
|
|
||||||
|
|
@ -225,7 +235,8 @@ lazy val scriptedPluginProj = (project in scriptedPath / "plugin")
|
||||||
.dependsOn(sbtProj)
|
.dependsOn(sbtProj)
|
||||||
.settings(
|
.settings(
|
||||||
baseSettings,
|
baseSettings,
|
||||||
name := "Scripted Plugin"
|
name := "Scripted Plugin",
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtCompilerClasspath)
|
.configure(addSbtCompilerClasspath)
|
||||||
|
|
||||||
|
|
@ -235,7 +246,8 @@ lazy val actionsProj = (project in file("main-actions"))
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Actions",
|
name := "Actions",
|
||||||
libraryDependencies += sjsonNewScalaJson.value
|
libraryDependencies += sjsonNewScalaJson.value,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(
|
.configure(
|
||||||
addSbtIO,
|
addSbtIO,
|
||||||
|
|
@ -259,7 +271,8 @@ lazy val protocolProj = (project in file("protocol"))
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
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",
|
||||||
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats
|
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtUtilLogging)
|
.configure(addSbtUtilLogging)
|
||||||
|
|
||||||
|
|
@ -274,7 +287,8 @@ lazy val commandProj = (project in file("main-command"))
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
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",
|
||||||
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats
|
contrabandFormatsForType in generateContrabands in Compile := ContrabandConfig.getFormats,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(
|
.configure(
|
||||||
addSbtIO,
|
addSbtIO,
|
||||||
|
|
@ -291,7 +305,8 @@ lazy val coreMacrosProj = (project in file("core-macros"))
|
||||||
.settings(
|
.settings(
|
||||||
commonSettings,
|
commonSettings,
|
||||||
name := "Core Macros",
|
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,
|
/* 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(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Main Settings",
|
name := "Main Settings",
|
||||||
resourceGenerators in Compile += generateToolboxClasspath.taskValue
|
resourceGenerators in Compile += generateToolboxClasspath.taskValue,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(
|
.configure(
|
||||||
addSbtIO,
|
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.
|
// 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"))
|
lazy val mainProj = (project in file("main"))
|
||||||
.enablePlugins(ContrabandPlugin)
|
.enablePlugins(ContrabandPlugin)
|
||||||
.dependsOn(logicProj, actionsProj, mainSettingsProj, runProj, commandProj)
|
.dependsOn(logicProj, actionsProj, mainSettingsProj, runProj, commandProj, collectionProj)
|
||||||
.settings(
|
.settings(
|
||||||
testedBaseSettings,
|
testedBaseSettings,
|
||||||
name := "Main",
|
name := "Main",
|
||||||
libraryDependencies ++= scalaXml.value ++ Seq(launcherInterface),
|
libraryDependencies ++= scalaXml.value ++ Seq(launcherInterface) ++ log4jDependencies,
|
||||||
managedSourceDirectories in Compile +=
|
managedSourceDirectories in Compile +=
|
||||||
baseDirectory.value / "src" / "main" / "contraband-scala",
|
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(
|
.configure(
|
||||||
addSbtIO,
|
addSbtIO,
|
||||||
|
|
@ -362,7 +379,8 @@ lazy val sbtProj = (project in file("sbt"))
|
||||||
name := "sbt",
|
name := "sbt",
|
||||||
normalizedName := "sbt",
|
normalizedName := "sbt",
|
||||||
crossScalaVersions := Seq(baseScalaVersion),
|
crossScalaVersions := Seq(baseScalaVersion),
|
||||||
crossPaths := false
|
crossPaths := false,
|
||||||
|
mimaSettings,
|
||||||
)
|
)
|
||||||
.configure(addSbtCompilerBridge)
|
.configure(addSbtCompilerBridge)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,10 @@ object AttributeKey {
|
||||||
rank: Int): AttributeKey[T] =
|
rank: Int): AttributeKey[T] =
|
||||||
make(name, Some(description), extend, rank)
|
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](
|
private[this] def make[T](
|
||||||
name: String,
|
name: String,
|
||||||
description0: Option[String],
|
description0: Option[String],
|
||||||
|
|
|
||||||
|
|
@ -37,4 +37,18 @@ object Util {
|
||||||
Camel.replaceAllIn(s, m => m.group(1) + "-" + m.group(2).toLowerCase(Locale.ENGLISH))
|
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
|
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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,22 @@ abstract class JLine extends LineReader {
|
||||||
protected[this] def handleCONT: Boolean
|
protected[this] def handleCONT: Boolean
|
||||||
protected[this] def reader: ConsoleReader
|
protected[this] def reader: ConsoleReader
|
||||||
protected[this] def injectThreadSleep: Boolean
|
protected[this] def injectThreadSleep: Boolean
|
||||||
protected[this] val in: InputStream = JLine.makeInputStream(injectThreadSleep)
|
protected[this] lazy val in: InputStream = {
|
||||||
|
// On Windows InputStream#available doesn't seem to return positive number.
|
||||||
def readLine(prompt: String, mask: Option[Char] = None) = JLine.withJLine {
|
JLine.makeInputStream(injectThreadSleep && !Util.isNonCygwinWindows)
|
||||||
unsynchronizedReadLine(prompt, mask)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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] =
|
private[this] def unsynchronizedReadLine(prompt: String, mask: Option[Char]): Option[String] =
|
||||||
readLineWithHistory(prompt, mask) map { x =>
|
readLineWithHistory(prompt, mask) map { x =>
|
||||||
x.trim
|
x.trim
|
||||||
|
|
@ -42,13 +52,9 @@ abstract class JLine extends LineReader {
|
||||||
|
|
||||||
private[this] def readLineDirectRaw(prompt: String, mask: Option[Char]): Option[String] = {
|
private[this] def readLineDirectRaw(prompt: String, mask: Option[Char]): Option[String] = {
|
||||||
val newprompt = handleMultilinePrompt(prompt)
|
val newprompt = handleMultilinePrompt(prompt)
|
||||||
try {
|
mask match {
|
||||||
mask match {
|
case Some(m) => Option(reader.readLine(newprompt, m))
|
||||||
case Some(m) => Option(reader.readLine(newprompt, m))
|
case None => Option(reader.readLine(newprompt))
|
||||||
case None => Option(reader.readLine(newprompt))
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
case e: InterruptedException => Option("")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,9 @@ private[sbt] final class ConsoleChannel(val name: String) extends CommandChannel
|
||||||
case Some(src) if src.channelName != name =>
|
case Some(src) if src.channelName != name =>
|
||||||
askUserThread match {
|
askUserThread match {
|
||||||
case Some(x) =>
|
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 _ =>
|
||||||
}
|
}
|
||||||
case _ =>
|
case _ =>
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,9 @@ sealed abstract class SettingKey[T]
|
||||||
import TupleSyntax._
|
import TupleSyntax._
|
||||||
set((this, other)(f), source)
|
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._
|
import TupleSyntax._
|
||||||
set((this, other)((a, b) => (a, b) map f.tupled), source)
|
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]] =
|
final def transform(f: T => T, source: SourcePosition): Setting[InputTask[T]] =
|
||||||
set(scopedKey(_ mapTask { _ map f }), source)
|
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. */
|
/** Methods and types related to constructing settings, including keys, scopes, and initializations. */
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package sbt.std
|
package sbt.std
|
||||||
|
|
||||||
|
import sbt.SettingKey
|
||||||
import sbt.internal.util.ConsoleAppender
|
import sbt.internal.util.ConsoleAppender
|
||||||
import sbt.internal.util.appmacro.{ Convert, Converted, LinterDSL }
|
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) =>
|
case ap @ Apply(TypeApply(Select(_, nme), tpe :: Nil), qual :: Nil) =>
|
||||||
val shouldIgnore = uncheckedWrappers.contains(ap)
|
val shouldIgnore = uncheckedWrappers.contains(ap)
|
||||||
val wrapperName = nme.decodedName.toString
|
val wrapperName = nme.decodedName.toString
|
||||||
if (!shouldIgnore && isTask(wrapperName, tpe.tpe, qual)) {
|
val (qualName, isSettingKey) =
|
||||||
val qualName =
|
Option(qual.symbol)
|
||||||
if (qual.symbol != null) qual.symbol.name.decodedName.toString
|
.map(sym => (sym.name.decodedName.toString, sym.info <:< typeOf[SettingKey[_]]))
|
||||||
else ap.pos.lineContent
|
.getOrElse((ap.pos.lineContent, false))
|
||||||
|
|
||||||
|
if (!isSettingKey && !shouldIgnore && isTask(wrapperName, tpe.tpe, qual)) {
|
||||||
if (insideIf && !isDynamicTask) {
|
if (insideIf && !isDynamicTask) {
|
||||||
// Error on the use of value inside the if of a regular task (dyn task is ok)
|
// Error on the use of value inside the if of a regular task (dyn task is ok)
|
||||||
ctx.error(ap.pos, TaskLinterDSLFeedback.useOfValueInsideIfExpression(qualName))
|
ctx.error(ap.pos, TaskLinterDSLFeedback.useOfValueInsideIfExpression(qualName))
|
||||||
|
|
|
||||||
|
|
@ -150,4 +150,25 @@ class TaskPosSpec {
|
||||||
avoidDCE
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package sbt
|
package sbt
|
||||||
|
|
||||||
import sbt.internal.util.SimpleReader
|
import sbt.internal.util.{ JLine, SimpleReader }
|
||||||
|
|
||||||
trait CommandLineUIService extends InteractionService {
|
trait CommandLineUIService extends InteractionService {
|
||||||
override def readLine(prompt: String, mask: Boolean): Option[String] = {
|
override def readLine(prompt: String, mask: Boolean): Option[String] = {
|
||||||
|
|
@ -19,6 +19,10 @@ trait CommandLineUIService extends InteractionService {
|
||||||
case _ => false
|
case _ => false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override def terminalWidth: Int = JLine.usingTerminal(_.getWidth)
|
||||||
|
|
||||||
|
override def terminalHeight: Int = JLine.usingTerminal(_.getHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
object CommandLineUIService extends CommandLineUIService
|
object CommandLineUIService extends CommandLineUIService
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ import scala.concurrent.duration.FiniteDuration
|
||||||
import scala.util.control.NonFatal
|
import scala.util.control.NonFatal
|
||||||
import scala.xml.NodeSeq
|
import scala.xml.NodeSeq
|
||||||
import Scope.{ fillTaskAxis, GlobalScope, ThisScope }
|
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 sjsonnew.shaded.scalajson.ast.unsafe.JValue
|
||||||
import std.TaskExtra._
|
import std.TaskExtra._
|
||||||
import testing.{ Framework, Runner, AnnotatedFingerprint, SubclassFingerprint }
|
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(
|
def compileBase = inTask(console)(compilersSetting :: Nil) ++ compileBaseGlobal ++ Seq(
|
||||||
incOptions := incOptions.value
|
incOptions := incOptions.value
|
||||||
.withClassfileManagerType(
|
.withClassfileManagerType(
|
||||||
|
|
@ -381,15 +382,7 @@ object Defaults extends BuildCommon {
|
||||||
.of(crossTarget.value / "classes.bak", sbt.util.Logger.Null): ClassFileManagerType).toOptional
|
.of(crossTarget.value / "classes.bak", sbt.util.Logger.Null): ClassFileManagerType).toOptional
|
||||||
),
|
),
|
||||||
scalaInstance := scalaInstanceTask.value,
|
scalaInstance := scalaInstanceTask.value,
|
||||||
crossVersion := (if (crossPaths.value) CrossVersion.binary else Disabled()),
|
crossVersion := (if (crossPaths.value) CrossVersion.binary else CrossVersion.disabled),
|
||||||
scalaVersion := {
|
|
||||||
val scalaV = scalaVersion.value
|
|
||||||
val sv = (sbtBinaryVersion in pluginCrossBuild).value
|
|
||||||
val isPlugin = sbtPlugin.value
|
|
||||||
if (isPlugin) {
|
|
||||||
scalaVersionFromSbtBinaryVersion(sv)
|
|
||||||
} else scalaV
|
|
||||||
},
|
|
||||||
sbtBinaryVersion in pluginCrossBuild := binarySbtVersion(
|
sbtBinaryVersion in pluginCrossBuild := binarySbtVersion(
|
||||||
(sbtVersion in pluginCrossBuild).value),
|
(sbtVersion in pluginCrossBuild).value),
|
||||||
crossSbtVersions := Vector((sbtVersion in pluginCrossBuild).value),
|
crossSbtVersions := Vector((sbtVersion in pluginCrossBuild).value),
|
||||||
|
|
@ -426,14 +419,6 @@ object Defaults extends BuildCommon {
|
||||||
derive(scalaBinaryVersion := binaryScalaVersion(scalaVersion.value))
|
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,
|
def makeCrossSources(scalaSrcDir: File,
|
||||||
javaSrcDir: File,
|
javaSrcDir: File,
|
||||||
sv: String,
|
sv: String,
|
||||||
|
|
@ -2173,16 +2158,26 @@ object Classpaths {
|
||||||
classifiers.toVector
|
classifiers.toVector
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
def deliverTask(config: TaskKey[PublishConfiguration]): Initialize[Task[File]] =
|
def deliverTask(config: TaskKey[PublishConfiguration]): Initialize[Task[File]] =
|
||||||
Def.task {
|
Def.task {
|
||||||
val _ = update.value
|
val _ = update.value
|
||||||
IvyActions.deliver(ivyModule.value, config.value, streams.value.log)
|
IvyActions.deliver(ivyModule.value, config.value, streams.value.log)
|
||||||
}
|
}
|
||||||
|
|
||||||
def publishTask(config: TaskKey[PublishConfiguration],
|
def publishTask(config: TaskKey[PublishConfiguration],
|
||||||
deliverKey: TaskKey[_]): Initialize[Task[Unit]] =
|
deliverKey: TaskKey[_]): Initialize[Task[Unit]] =
|
||||||
Def.task {
|
Def.taskDyn {
|
||||||
IvyActions.publish(ivyModule.value, config.value, streams.value.log)
|
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)
|
} tag (Tags.Publish, Tags.Network)
|
||||||
|
|
||||||
val moduleIdJsonKeyFormat: sjsonnew.JsonKeyFormat[ModuleID] =
|
val moduleIdJsonKeyFormat: sjsonnew.JsonKeyFormat[ModuleID] =
|
||||||
new sjsonnew.JsonKeyFormat[ModuleID] {
|
new sjsonnew.JsonKeyFormat[ModuleID] {
|
||||||
import sjsonnew.support.scalajson.unsafe._
|
import sjsonnew.support.scalajson.unsafe._
|
||||||
|
|
@ -2300,16 +2295,18 @@ object Classpaths {
|
||||||
}.value
|
}.value
|
||||||
|
|
||||||
LibraryManagement.cachedUpdate(
|
LibraryManagement.cachedUpdate(
|
||||||
|
// LM API
|
||||||
|
lm = dependencyResolution.value,
|
||||||
|
// Ivy-free ModuleDescriptor
|
||||||
|
module = ivyModule.value,
|
||||||
s.cacheStoreFactory.sub(updateCacheName.value),
|
s.cacheStoreFactory.sub(updateCacheName.value),
|
||||||
Reference.display(thisProjectRef.value),
|
Reference.display(thisProjectRef.value),
|
||||||
ivyModule.value,
|
|
||||||
updateConf,
|
updateConf,
|
||||||
substituteScalaFiles(scalaOrganization.value, _)(providedScalaJars),
|
substituteScalaFiles(scalaOrganization.value, _)(providedScalaJars),
|
||||||
skip = (skip in update).value,
|
skip = (skip in update).value,
|
||||||
force = shouldForce,
|
force = shouldForce,
|
||||||
depsUpdated = transitiveUpdate.value.exists(!_.stats.cached),
|
depsUpdated = transitiveUpdate.value.exists(!_.stats.cached),
|
||||||
uwConfig = (unresolvedWarningConfiguration in update).value,
|
uwConfig = (unresolvedWarningConfiguration in update).value,
|
||||||
depDir = Some(dependencyCacheDirectory.value),
|
|
||||||
ewo = evictionOptions,
|
ewo = evictionOptions,
|
||||||
mavenStyle = publishMavenStyle.value,
|
mavenStyle = publishMavenStyle.value,
|
||||||
compatWarning = compatibilityWarningOptions.value,
|
compatWarning = compatibilityWarningOptions.value,
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,9 @@ abstract class InteractionService {
|
||||||
/** Ask the user to confirm something (yes or no) before continuing. */
|
/** Ask the user to confirm something (yes or no) before continuing. */
|
||||||
def confirm(msg: String): Boolean
|
def confirm(msg: String): Boolean
|
||||||
|
|
||||||
|
def terminalWidth: Int
|
||||||
|
|
||||||
|
def terminalHeight: Int
|
||||||
|
|
||||||
// TODO - Ask for input with autocomplete?
|
// TODO - Ask for input with autocomplete?
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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."
|
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
|
// logging
|
||||||
val logLevel = SettingKey[Level.Value]("log-level", "The amount of logging sent to the screen.", ASetting)
|
val logLevel = settingKey[Level.Value]("The amount of logging sent to the screen.").withRank(ASetting)
|
||||||
val persistLogLevel = SettingKey[Level.Value]("persist-log-level", "The amount of logging sent to a file for persistence.", CSetting)
|
val persistLogLevel = settingKey[Level.Value]("The amount of logging sent to a file for persistence.").withRank(CSetting)
|
||||||
val traceLevel = SettingKey[Int]("trace-level", "The amount of a stack trace displayed. " + TraceValues, ASetting)
|
val traceLevel = settingKey[Int]("The amount of a stack trace displayed. " + TraceValues).withRank(ASetting)
|
||||||
val persistTraceLevel = SettingKey[Int]("persist-trace-level", "The amount of stack trace persisted.", CSetting)
|
val persistTraceLevel = settingKey[Int]("The amount of stack trace persisted.").withRank(CSetting)
|
||||||
val showSuccess = SettingKey[Boolean]("show-success", "If true, displays a success message after running a command successfully.", CSetting)
|
val showSuccess = settingKey[Boolean]("If true, displays a success message after running a command successfully.").withRank(CSetting)
|
||||||
val showTiming = SettingKey[Boolean]("show-timing", "If true, the command success message includes the completion time.", CSetting)
|
val showTiming = settingKey[Boolean]("If true, the command success message includes the completion time.").withRank(CSetting)
|
||||||
val timingFormat = SettingKey[java.text.DateFormat]("timing-format", "The format used for displaying the completion time.", CSetting)
|
val timingFormat = settingKey[java.text.DateFormat]("The format used for displaying the completion time.").withRank(CSetting)
|
||||||
val extraLoggers = SettingKey[ScopedKey[_] => Seq[Appender]]("extra-loggers", "A function that provides additional loggers for a given setting.", DSetting)
|
val extraLoggers = settingKey[ScopedKey[_] => Seq[Appender]]("A function that provides additional loggers for a given setting.").withRank(DSetting)
|
||||||
val logManager = SettingKey[LogManager]("log-manager", "The log manager, which creates Loggers for different contexts.", DSetting)
|
val logManager = settingKey[LogManager]("The log manager, which creates Loggers for different contexts.").withRank(DSetting)
|
||||||
val logBuffered = SettingKey[Boolean]("log-buffered", "True if logging should be buffered until work completes.", CSetting)
|
val logBuffered = settingKey[Boolean]("True if logging should be buffered until work completes.").withRank(CSetting)
|
||||||
val sLog = SettingKey[Logger]("setting-logger", "Logger usable by settings during project loading.", CSetting)
|
val sLog = settingKey[Logger]("Logger usable by settings during project loading.").withRank(CSetting)
|
||||||
|
|
||||||
// Project keys
|
// 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 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]("project-command", "Marks Commands that were registered for the current Project.", Invisible)
|
val projectCommand = AttributeKey[Boolean]("projectCommand", "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 sessionSettings = AttributeKey[SessionSettings]("sessionSettings", "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 stateBuildStructure = AttributeKey[BuildStructure]("stateBuildStructure", "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 buildStructure = taskKey[BuildStructure]("Provides access to the build structure, settings, and streams manager.").withRank(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 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]("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 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]("app-configuration", "Provides access to the launched sbt configuration, including the ScalaProvider, Launcher, and GlobalLock.", 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]("this-project", "Provides the current project for the referencing scope.", CSetting)
|
val thisProject = settingKey[ResolvedProject]("Provides the current project for the referencing scope.").withRank(CSetting)
|
||||||
val thisProjectRef = SettingKey[ProjectRef]("this-project-ref", "Provides a fully-resolved reference to the current project for the referencing scope.", CSetting)
|
val thisProjectRef = settingKey[ProjectRef]("Provides a fully-resolved reference to the current project for the referencing scope.").withRank(CSetting)
|
||||||
val configuration = SettingKey[Configuration]("configuration", "Provides the current configuration of the referencing scope.", CSetting)
|
val configuration = settingKey[Configuration]("Provides the current configuration of the referencing scope.").withRank(CSetting)
|
||||||
val commands = SettingKey[Seq[Command]]("commands", "Defines commands to be registered when this project or build is the current selected one.", 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]("initialize", "A convenience setting for performing side-effects during initialization.", BSetting)
|
val initialize = settingKey[Unit]("A convenience setting for performing side-effects during initialization.").withRank(BSetting)
|
||||||
val onLoad = SettingKey[State => State]("on-load", "Transformation to apply to the build state when the build is loaded.", DSetting)
|
val onLoad = settingKey[State => State]("Transformation to apply to the build state when the build is loaded.").withRank(DSetting)
|
||||||
val onUnload = SettingKey[State => State]("on-unload", "Transformation to apply to the build state when the build is unloaded.", DSetting)
|
val onUnload = settingKey[State => State]("Transformation to apply to the build state when the build is unloaded.").withRank(DSetting)
|
||||||
val onLoadMessage = SettingKey[String]("on-load-message", "Message to display when the project is loaded.", DSetting)
|
val onLoadMessage = settingKey[String]("Message to display when the project is loaded.").withRank(DSetting)
|
||||||
val transformState = AttributeKey[State => State]("transform-state", "State transformation to apply after tasks run.", 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
|
// Command keys
|
||||||
val historyPath = SettingKey(BasicKeys.historyPath)
|
val historyPath = SettingKey(BasicKeys.historyPath)
|
||||||
|
|
@ -129,137 +129,137 @@ object Keys {
|
||||||
val serverPort = SettingKey(BasicKeys.serverPort)
|
val serverPort = SettingKey(BasicKeys.serverPort)
|
||||||
val analysis = AttributeKey[CompileAnalysis]("analysis", "Analysis of compilation, including dependencies and generated outputs.", DSetting)
|
val analysis = AttributeKey[CompileAnalysis]("analysis", "Analysis of compilation, including dependencies and generated outputs.", DSetting)
|
||||||
val watch = SettingKey(BasicKeys.watch)
|
val watch = SettingKey(BasicKeys.watch)
|
||||||
val suppressSbtShellNotification = SettingKey[Boolean]("suppressSbtShellNotification", """True to suppress the "Executing in batch mode.." message.""", CSetting)
|
val suppressSbtShellNotification = settingKey[Boolean]("""True to suppress the "Executing in batch mode.." message.""").withRank(CSetting)
|
||||||
val pollInterval = SettingKey[FiniteDuration]("poll-interval", "Interval between checks for modified sources by the continuous execution command.", BMinusSetting)
|
val pollInterval = settingKey[FiniteDuration]("Interval between checks for modified sources by the continuous execution command.").withRank(BMinusSetting)
|
||||||
val watchService = SettingKey[() => WatchService]("watch-service", "Service to use to monitor file system changes.", BMinusSetting)
|
val watchService = settingKey[() => WatchService]("Service to use to monitor file system changes.").withRank(BMinusSetting)
|
||||||
val watchSources = TaskKey[Seq[Source]]("watch-sources", "Defines the sources in this project for continuous execution to watch for changes.", 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]]("watch-transitive-sources", "Defines the sources in all projects for continuous execution to watch.", CSetting)
|
val watchTransitiveSources = taskKey[Seq[Source]]("Defines the sources in all projects for continuous execution to watch.").withRank(CSetting)
|
||||||
val watchingMessage = SettingKey[WatchState => String]("watching-message", "The message to show when triggered execution waits for sources to change.", DSetting)
|
val watchingMessage = settingKey[WatchState => String]("The message to show when triggered execution waits for sources to change.").withRank(DSetting)
|
||||||
val triggeredMessage = SettingKey[WatchState => String]("triggered-message", "The message to show before triggered execution executes an action after sources change.", DSetting)
|
val triggeredMessage = settingKey[WatchState => String]("The message to show before triggered execution executes an action after sources change.").withRank(DSetting)
|
||||||
|
|
||||||
// Path Keys
|
// 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 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]("target", "Main directory for files generated by the build.", AMinusSetting)
|
val target = settingKey[File]("Main directory for files generated by the build.").withRank(AMinusSetting)
|
||||||
val crossTarget = SettingKey[File]("cross-target", "Main directory for files generated by the build that are cross-built.", BSetting)
|
val crossTarget = settingKey[File]("Main directory for files generated by the build that are cross-built.").withRank(BSetting)
|
||||||
|
|
||||||
// Source paths
|
// Source paths
|
||||||
val sourceDirectory = SettingKey[File]("source-directory", "Default directory containing sources.", AMinusSetting)
|
val sourceDirectory = settingKey[File]("Default directory containing sources.").withRank(AMinusSetting)
|
||||||
val sourceManaged = SettingKey[File]("source-managed", "Default directory for sources generated by the build.", BPlusSetting)
|
val sourceManaged = settingKey[File]("Default directory for sources generated by the build.").withRank(BPlusSetting)
|
||||||
val scalaSource = SettingKey[File]("scala-source", "Default Scala source directory.", ASetting)
|
val scalaSource = settingKey[File]("Default Scala source directory.").withRank(ASetting)
|
||||||
val javaSource = SettingKey[File]("java-source", "Default Java source directory.", ASetting)
|
val javaSource = settingKey[File]("Default Java source directory.").withRank(ASetting)
|
||||||
val sourceDirectories = SettingKey[Seq[File]]("source-directories", "List of all source directories, both managed and unmanaged.", AMinusSetting)
|
val sourceDirectories = settingKey[Seq[File]]("List of all source directories, both managed and unmanaged.").withRank(AMinusSetting)
|
||||||
val unmanagedSourceDirectories = SettingKey[Seq[File]]("unmanaged-source-directories", "Unmanaged source directories, which contain manually created sources.", ASetting)
|
val unmanagedSourceDirectories = settingKey[Seq[File]]("Unmanaged source directories, which contain manually created sources.").withRank(ASetting)
|
||||||
val unmanagedSources = TaskKey[Seq[File]]("unmanaged-sources", "Unmanaged sources, which are manually created.", BPlusTask)
|
val unmanagedSources = taskKey[Seq[File]]("Unmanaged sources, which are manually created.").withRank(BPlusTask)
|
||||||
val managedSourceDirectories = SettingKey[Seq[File]]("managed-source-directories", "Managed source directories, which contain sources generated by the build.", BSetting)
|
val managedSourceDirectories = settingKey[Seq[File]]("Managed source directories, which contain sources generated by the build.").withRank(BSetting)
|
||||||
val managedSources = TaskKey[Seq[File]]("managed-sources", "Sources generated by the build.", BTask)
|
val managedSources = taskKey[Seq[File]]("Sources generated by the build.").withRank(BTask)
|
||||||
val sources = TaskKey[Seq[File]]("sources", "All sources, both managed and unmanaged.", BTask)
|
val sources = taskKey[Seq[File]]("All sources, both managed and unmanaged.").withRank(BTask)
|
||||||
val sourcesInBase = SettingKey[Boolean]("sources-in-base", "If true, sources from the project's base directory are included as main sources.")
|
val sourcesInBase = settingKey[Boolean]("If true, sources from the project's base directory are included as main sources.")
|
||||||
|
|
||||||
// Filters
|
// Filters
|
||||||
val includeFilter = SettingKey[FileFilter]("include-filter", "Filter for including 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]("exclude-filter", "Filter for excluding sources and resources files from default directories.", CSetting)
|
val excludeFilter = settingKey[FileFilter]("Filter for excluding sources and resources files from default directories.").withRank(CSetting)
|
||||||
|
|
||||||
// Resource paths
|
// Resource paths
|
||||||
val resourceDirectory = SettingKey[File]("resource-directory", "Default unmanaged resource directory, used for user-defined resources.", ASetting)
|
val resourceDirectory = settingKey[File]("Default unmanaged resource directory, used for user-defined resources.").withRank(ASetting)
|
||||||
val resourceManaged = SettingKey[File]("resource-managed", "Default managed resource directory, used when generating resources.", BSetting)
|
val resourceManaged = settingKey[File]("Default managed resource directory, used when generating resources.").withRank(BSetting)
|
||||||
val unmanagedResourceDirectories = SettingKey[Seq[File]]("unmanaged-resource-directories", "Unmanaged resource directories, containing resources manually created by the user.", AMinusSetting)
|
val unmanagedResourceDirectories = settingKey[Seq[File]]("Unmanaged resource directories, containing resources manually created by the user.").withRank(AMinusSetting)
|
||||||
val unmanagedResources = TaskKey[Seq[File]]("unmanaged-resources", "Unmanaged resources, which are manually created.", BPlusTask)
|
val unmanagedResources = taskKey[Seq[File]]("Unmanaged resources, which are manually created.").withRank(BPlusTask)
|
||||||
val managedResourceDirectories = SettingKey[Seq[File]]("managed-resource-directories", "List of managed resource directories.", AMinusSetting)
|
val managedResourceDirectories = settingKey[Seq[File]]("List of managed resource directories.").withRank(AMinusSetting)
|
||||||
val managedResources = TaskKey[Seq[File]]("managed-resources", "Resources generated by the build.", BTask)
|
val managedResources = taskKey[Seq[File]]("Resources generated by the build.").withRank(BTask)
|
||||||
val resourceDirectories = SettingKey[Seq[File]]("resource-directories", "List of all resource directories, both managed and unmanaged.", BPlusSetting)
|
val resourceDirectories = settingKey[Seq[File]]("List of all resource directories, both managed and unmanaged.").withRank(BPlusSetting)
|
||||||
val resources = TaskKey[Seq[File]]("resources", "All resource files, both managed and unmanaged.", BTask)
|
val resources = taskKey[Seq[File]]("All resource files, both managed and unmanaged.").withRank(BTask)
|
||||||
|
|
||||||
// Output paths
|
// Output paths
|
||||||
val classDirectory = SettingKey[File]("class-directory", "Directory for compiled classes and copied resources.", AMinusSetting)
|
val classDirectory = settingKey[File]("Directory for compiled classes and copied resources.").withRank(AMinusSetting)
|
||||||
val cleanFiles = TaskKey[Seq[File]]("clean-files", "The files to recursively delete during a clean.", BSetting)
|
val cleanFiles = taskKey[Seq[File]]("The files to recursively delete during a clean.").withRank(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 cleanKeepFiles = settingKey[Seq[File]]("Files or directories to keep during a clean. Must be direct children of target.").withRank(CSetting)
|
||||||
val crossPaths = SettingKey[Boolean]("cross-paths", "If true, enables cross paths, which distinguish input and output directories for cross-building.", ASetting)
|
val crossPaths = settingKey[Boolean]("If true, enables cross paths, which distinguish input and output directories for cross-building.").withRank(ASetting)
|
||||||
val taskTemporaryDirectory = SettingKey[File]("task-temporary-directory", "Directory used for temporary files for tasks that is deleted after each task execution.", DSetting)
|
val taskTemporaryDirectory = settingKey[File]("Directory used for temporary files for tasks that is deleted after each task execution.").withRank(DSetting)
|
||||||
|
|
||||||
// Generators
|
// Generators
|
||||||
val sourceGenerators = SettingKey[Seq[Task[Seq[File]]]]("source-generators", "List of tasks that generate sources.", CSetting)
|
val sourceGenerators = settingKey[Seq[Task[Seq[File]]]]("List of tasks that generate sources.").withRank(CSetting)
|
||||||
val resourceGenerators = SettingKey[Seq[Task[Seq[File]]]]("resource-generators", "List of tasks that generate resources.", CSetting)
|
val resourceGenerators = settingKey[Seq[Task[Seq[File]]]]("List of tasks that generate resources.").withRank(CSetting)
|
||||||
|
|
||||||
// compile/doc keys
|
// 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 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]("max-errors", "The maximum number of errors, such as compile errors, to list.", ASetting)
|
val maxErrors = settingKey[Int]("The maximum number of errors, such as compile errors, to list.").withRank(ASetting)
|
||||||
val scalacOptions = TaskKey[Seq[String]]("scalac-options", "Options for the Scala compiler.", BPlusTask)
|
val scalacOptions = taskKey[Seq[String]]("Options for the Scala compiler.").withRank(BPlusTask)
|
||||||
val javacOptions = TaskKey[Seq[String]]("javac-options", "Options for the Java compiler.", BPlusTask)
|
val javacOptions = taskKey[Seq[String]]("Options for the Java compiler.").withRank(BPlusTask)
|
||||||
val incOptions = TaskKey[IncOptions]("inc-options", "Options for the incremental compiler.", BTask)
|
val incOptions = taskKey[IncOptions]("Options for the incremental compiler.").withRank(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 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", "Initial commands to execute when starting up the Scala interpreter.", AMinusSetting)
|
val initialCommands = settingKey[String]("Initial commands to execute when starting up the Scala interpreter.").withRank(AMinusSetting)
|
||||||
val cleanupCommands = SettingKey[String]("cleanup-commands", "Commands to execute before the Scala interpreter exits.", BMinusSetting)
|
val cleanupCommands = settingKey[String]("Commands to execute before the Scala interpreter exits.").withRank(BMinusSetting)
|
||||||
val asciiGraphWidth = SettingKey[Int]("asciiGraphWidth", "Determines maximum width of the settings graph in ASCII mode", AMinusSetting)
|
val asciiGraphWidth = settingKey[Int]("Determines maximum width of the settings graph in ASCII mode").withRank(AMinusSetting)
|
||||||
val compileOptions = TaskKey[CompileOptions]("compile-options", "Collects basic options to configure compilers", DTask)
|
val compileOptions = taskKey[CompileOptions]("Collects basic options to configure compilers").withRank(DTask)
|
||||||
val compileInputs = TaskKey[Inputs]("compile-inputs", "Collects all inputs needed for compilation.", DTask)
|
val compileInputs = taskKey[Inputs]("Collects all inputs needed for compilation.").withRank(DTask)
|
||||||
val scalaHome = SettingKey[Option[File]]("scala-home", "If Some, defines the local Scala installation to use for compilation, running, and testing.", ASetting)
|
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]("scala-instance", "Defines the Scala instance to use for compilation, running, and testing.", DTask)
|
val scalaInstance = taskKey[ScalaInstance]("Defines the Scala instance to use for compilation, running, and testing.").withRank(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 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]("scala-version", "The version of Scala used for building.", APlusSetting)
|
val scalaVersion = settingKey[String]("The version of Scala used for building.").withRank(APlusSetting)
|
||||||
val scalaBinaryVersion = SettingKey[String]("scala-binary-version", "The Scala version substring describing binary compatibility.", BPlusSetting)
|
val scalaBinaryVersion = settingKey[String]("The Scala version substring describing binary compatibility.").withRank(BPlusSetting)
|
||||||
val crossScalaVersions = SettingKey[Seq[String]]("cross-scala-versions", "The versions of Scala used when cross-building.", BPlusSetting)
|
val crossScalaVersions = settingKey[Seq[String]]("The versions of Scala used when cross-building.").withRank(BPlusSetting)
|
||||||
val crossVersion = SettingKey[CrossVersion]("cross-version", "Configures handling of the Scala version when cross-building.", CSetting)
|
val crossVersion = settingKey[CrossVersion]("Configures handling of the Scala version when cross-building.").withRank(CSetting)
|
||||||
val classpathOptions = SettingKey[ClasspathOptions]("classpath-options", "Configures handling of Scala classpaths.", DSetting)
|
val classpathOptions = settingKey[ClasspathOptions]("Configures handling of Scala classpaths.").withRank(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 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]("sbt-plugin", "If true, enables adding sbt as a dependency and auto-generation of the plugin descriptor file.", BMinusSetting)
|
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]("pluginCrossBuild", "Dummy task to scope `sbtVersion in pluginCrossBuild`, which gets used for plugin compilation.")
|
val pluginCrossBuild = taskKey[Unit]("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 crossSbtVersions = settingKey[Seq[String]]("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 printWarnings = taskKey[Unit]("Shows warnings from compilation, including ones that weren't printed initially.").withRank(BPlusTask)
|
||||||
val fileInputOptions = SettingKey[Seq[String]]("file-input-options", "Options that take file input, which may invalidate the cache.", CSetting)
|
val fileInputOptions = settingKey[Seq[String]]("Options that take file input, which may invalidate the cache.").withRank(CSetting)
|
||||||
val scalaCompilerBridgeSource = SettingKey[ModuleID]("scala-compiler-bridge-source", "Configures the module ID of the sources of the compiler bridge.", CSetting)
|
val scalaCompilerBridgeSource = settingKey[ModuleID]("Configures the module ID of the sources of the compiler bridge.").withRank(CSetting)
|
||||||
val scalaArtifacts = SettingKey[Seq[String]]("scala-artifacts", "Configures the list of artifacts which should match the Scala binary version", CSetting)
|
val scalaArtifacts = settingKey[Seq[String]]("Configures the list of artifacts which should match the Scala binary version").withRank(CSetting)
|
||||||
val enableBinaryCompileAnalysis = SettingKey[Boolean]("binary-analysis", "Writes the analysis file in binary format")
|
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 clean = taskKey[Unit]("Deletes files produced by the build, such as generated sources, compiled classes, and task caches.").withRank(APlusTask)
|
||||||
val console = TaskKey[Unit]("console", "Starts the Scala interpreter with the project classes on the classpath.", APlusTask)
|
val console = taskKey[Unit]("Starts the Scala interpreter with the project classes on the classpath.").withRank(APlusTask)
|
||||||
val consoleQuick = TaskKey[Unit]("console-quick", "Starts the Scala interpreter with the project dependencies on the classpath.", ATask, console)
|
val consoleQuick = TaskKey[Unit]("consoleQuick", "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 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]("compile", "Compiles sources.", APlusTask)
|
val compile = taskKey[CompileAnalysis]("Compiles sources.").withRank(APlusTask)
|
||||||
val manipulateBytecode = TaskKey[CompileResult]("manipulateBytecode", "Manipulates generated bytecode", BTask)
|
val manipulateBytecode = taskKey[CompileResult]("Manipulates generated bytecode").withRank(BTask)
|
||||||
val compileIncremental = TaskKey[CompileResult]("compileIncremental", "Actually runs the incremental compilation", DTask)
|
val compileIncremental = taskKey[CompileResult]("Actually runs the incremental compilation").withRank(DTask)
|
||||||
val previousCompile = TaskKey[PreviousResult]("readAnalysis", "Read the incremental compiler analysis from disk", DTask)
|
val previousCompile = taskKey[PreviousResult]("Read the incremental compiler analysis from disk").withRank(DTask)
|
||||||
val compilers = TaskKey[Compilers]("compilers", "Defines the Scala and Java compilers to use for compilation.", DTask)
|
val compilers = taskKey[Compilers]("Defines the Scala and Java compilers to use for compilation.").withRank(DTask)
|
||||||
val compileAnalysisFilename = TaskKey[String]("compileAnalysisFilename", "Defines the filename used to store the incremental compiler analysis file (inside the streams cacheDirectory).", 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]("inc-compile-setup", "Configures aspects of incremental compilation.", DTask)
|
val compileIncSetup = taskKey[Setup]("Configures aspects of incremental compilation.").withRank(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 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]("compiler-cache", "Internal use: Global cache.")
|
val stateCompilerCache = AttributeKey[GlobalsCache]("stateCompilerCache", "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 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]("doc", "Generates API documentation.", AMinusTask)
|
val doc = taskKey[File]("Generates API documentation.").withRank(AMinusTask)
|
||||||
val copyResources = TaskKey[Seq[(File, File)]]("copy-resources", "Copies resources to the output directory.", AMinusTask)
|
val copyResources = taskKey[Seq[(File, File)]]("Copies resources to the output directory.").withRank(AMinusTask)
|
||||||
val aggregate = SettingKey[Boolean]("aggregate", "Configures task aggregation.", BMinusSetting)
|
val aggregate = settingKey[Boolean]("Configures task aggregation.").withRank(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 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
|
// package keys
|
||||||
val packageBin = TaskKey[File]("package-bin", "Produces a main artifact, such as a binary jar.", ATask)
|
val packageBin = taskKey[File]("Produces a main artifact, such as a binary jar.").withRank(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 `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]("package-doc", "Produces a documentation artifact, such as a jar containing API documentation.", AMinusTask)
|
val packageDoc = taskKey[File]("Produces a documentation artifact, such as a jar containing API documentation.").withRank(AMinusTask)
|
||||||
val packageSrc = TaskKey[File]("package-src", "Produces a source artifact, such as a jar containing sources and resources.", 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 packageOptions = taskKey[Seq[PackageOption]]("Options for packaging.").withRank(BTask)
|
||||||
val packageConfiguration = TaskKey[Package.Configuration]("package-configuration", "Collects all inputs needed for packaging.", DTask)
|
val packageConfiguration = taskKey[Package.Configuration]("Collects all inputs needed for packaging.").withRank(DTask)
|
||||||
val artifactPath = SettingKey[File]("artifact-path", "The location of a generated artifact.", BPlusSetting)
|
val artifactPath = settingKey[File]("The location of a generated artifact.").withRank(BPlusSetting)
|
||||||
val artifact = SettingKey[Artifact]("artifact", "Describes an artifact.", BMinusSetting)
|
val artifact = settingKey[Artifact]("Describes an artifact.").withRank(BMinusSetting)
|
||||||
val artifactClassifier = SettingKey[Option[String]]("artifact-classifier", "Sets the classifier used by the default artifact definition.", BSetting)
|
val artifactClassifier = settingKey[Option[String]]("Sets the classifier used by the default artifact definition.").withRank(BSetting)
|
||||||
val artifactName = SettingKey[(ScalaVersion, ModuleID, Artifact) => String]("artifact-name", "Function that produces the artifact name from its definition.", CSetting)
|
val artifactName = settingKey[(ScalaVersion, ModuleID, Artifact) => String]("Function that produces the artifact name from its definition.").withRank(CSetting)
|
||||||
val mappings = TaskKey[Seq[(File, String)]]("mappings", "Defines the mappings from a file to a path, used by packaging, for example.", BTask)
|
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)]]("file-mappings", "Defines the mappings from a file to a file, used for copying files, for example.", BMinusTask)
|
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
|
// Run Keys
|
||||||
val selectMainClass = TaskKey[Option[String]]("select-main-class", "Selects the main class to run.", BMinusTask)
|
val selectMainClass = taskKey[Option[String]]("Selects the main class to run.").withRank(BMinusTask)
|
||||||
val mainClass = TaskKey[Option[String]]("main-class", "Defines the main class for packaging or running.", BPlusTask)
|
val mainClass = taskKey[Option[String]]("Defines the main class for packaging or running.").withRank(BPlusTask)
|
||||||
val run = InputKey[Unit]("run", "Runs a main class, passing along arguments provided on the command line.", APlusTask)
|
val run = inputKey[Unit]("Runs a main class, passing along arguments provided on the command line.").withRank(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 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]]("discovered-main-classes", "Auto-detects main classes.", BMinusTask)
|
val discoveredMainClasses = taskKey[Seq[String]]("Auto-detects main classes.").withRank(BMinusTask)
|
||||||
val runner = TaskKey[ScalaRun]("runner", "Implementation used to run a main class.", DTask)
|
val runner = taskKey[ScalaRun]("Implementation used to run a main class.").withRank(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 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 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]("fork-options", "Configures JVM forking.", DSetting)
|
val forkOptions = taskKey[ForkOptions]("Configures JVM forking.").withRank(DSetting)
|
||||||
val outputStrategy = SettingKey[Option[sbt.OutputStrategy]]("output-strategy", "Selects how to log output when running a main class.", DSetting)
|
val outputStrategy = settingKey[Option[sbt.OutputStrategy]]("Selects how to log output when running a main class.").withRank(DSetting)
|
||||||
val connectInput = SettingKey[Boolean]("connect-input", "If true, connects standard input when running a main class forked.", CSetting)
|
val connectInput = settingKey[Boolean]("If true, connects standard input when running a main class forked.").withRank(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 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]]("java-options", "Options passed to a new JVM when forking.", BPlusTask)
|
val javaOptions = taskKey[Seq[String]]("Options passed to a new JVM when forking.").withRank(BPlusTask)
|
||||||
val envVars = TaskKey[Map[String, String]]("envVars", "Environment variables used when forking a new JVM", BTask)
|
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 bgJobService = settingKey[BackgroundJobService]("Job manager used to run background jobs.")
|
||||||
val bgList = taskKey[Seq[JobHandle]]("List running 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.")
|
val bgCopyClasspath = settingKey[Boolean]("Copies classpath on bgRun to prevent conflict.")
|
||||||
|
|
||||||
// Test Keys
|
// Test Keys
|
||||||
val testLoader = TaskKey[ClassLoader]("test-loader", "Provides the class loader used for testing.", DTask)
|
val testLoader = taskKey[ClassLoader]("Provides the class loader used for testing.").withRank(DTask)
|
||||||
val loadedTestFrameworks = TaskKey[Map[TestFramework, Framework]]("loaded-test-frameworks", "Loads Framework definitions from the test loader.", DTask)
|
val loadedTestFrameworks = taskKey[Map[TestFramework, Framework]]("Loads Framework definitions from the test loader.").withRank(DTask)
|
||||||
val definedTests = TaskKey[Seq[TestDefinition]]("defined-tests", "Provides the list of defined tests.", BMinusTask)
|
val definedTests = taskKey[Seq[TestDefinition]]("Provides the list of defined tests.").withRank(BMinusTask)
|
||||||
val definedTestNames = TaskKey[Seq[String]]("defined-test-names", "Provides the set of defined test names.", BMinusTask)
|
val definedTestNames = taskKey[Seq[String]]("Provides the set of defined test names.").withRank(BMinusTask)
|
||||||
val executeTests = TaskKey[Tests.Output]("execute-tests", "Executes all tests, producing a report.", CTask)
|
val executeTests = taskKey[Tests.Output]("Executes all tests, producing a report.").withRank(CTask)
|
||||||
val test = TaskKey[Unit]("test", "Executes all tests.", APlusTask)
|
val test = taskKey[Unit]("Executes all tests.").withRank(APlusTask)
|
||||||
val testOnly = InputKey[Unit]("test-only", "Executes the tests provided as arguments or all tests if no arguments are provided.", ATask)
|
val testOnly = inputKey[Unit]("Executes the tests provided as arguments or all tests if no arguments are provided.").withRank(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 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]]("test-options", "Options for running tests.", BPlusTask)
|
val testOptions = taskKey[Seq[TestOption]]("Options for running tests.").withRank(BPlusTask)
|
||||||
val testFrameworks = SettingKey[Seq[TestFramework]]("test-frameworks", "Registered, although not necessarily present, test frameworks.", CTask)
|
val testFrameworks = settingKey[Seq[TestFramework]]("Registered, although not necessarily present, test frameworks.").withRank(CTask)
|
||||||
val testListeners = TaskKey[Seq[TestReportListener]]("test-listeners", "Defines test listeners.", DTask)
|
val testListeners = taskKey[Seq[TestReportListener]]("Defines test listeners.").withRank(DTask)
|
||||||
val testForkedParallel = SettingKey[Boolean]("test-forked-parallel", "Whether forked tests should be executed in parallel", CTask)
|
val testForkedParallel = settingKey[Boolean]("Whether forked tests should be executed in parallel").withRank(CTask)
|
||||||
val testExecution = TaskKey[Tests.Execution]("test-execution", "Settings controlling test execution", DTask)
|
val testExecution = taskKey[Tests.Execution]("Settings controlling test execution").withRank(DTask)
|
||||||
val testFilter = TaskKey[Seq[String] => Seq[String => Boolean]]("test-filter", "Filter controlling whether the test is executed", DTask)
|
val testFilter = taskKey[Seq[String] => Seq[String => Boolean]]("Filter controlling whether the test is executed").withRank(DTask)
|
||||||
val testResultLogger = SettingKey[TestResultLogger]("test-result-logger", "Logs results after a test task completes.", DTask)
|
val testResultLogger = settingKey[TestResultLogger]("Logs results after a test task completes.").withRank(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 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]("is-module", "True if the target is a module.", DSetting)
|
val isModule = AttributeKey[Boolean]("isModule", "True if the target is a module.", DSetting)
|
||||||
|
|
||||||
// Classpath/Dependency Management Keys
|
// Classpath/Dependency Management Keys
|
||||||
type Classpath = Def.Classpath
|
type Classpath = Def.Classpath
|
||||||
|
|
||||||
val name = SettingKey[String]("name", "Project name.", APlusSetting)
|
val name = settingKey[String]("Project name.").withRank(APlusSetting)
|
||||||
val normalizedName = SettingKey[String]("normalized-name", "Project name transformed from mixed case and spaces to lowercase and dash-separated.", BSetting)
|
val normalizedName = settingKey[String]("Project name transformed from mixed case and spaces to lowercase and dash-separated.").withRank(BSetting)
|
||||||
val description = SettingKey[String]("description", "Project description.", BSetting)
|
val description = settingKey[String]("Project description.").withRank(BSetting)
|
||||||
val homepage = SettingKey[Option[URL]]("homepage", "Project homepage.", BSetting)
|
val homepage = settingKey[Option[URL]]("Project homepage.").withRank(BSetting)
|
||||||
val startYear = SettingKey[Option[Int]]("start-year", "Year in which the project started.", BMinusSetting)
|
val startYear = settingKey[Option[Int]]("Year in which the project started.").withRank(BMinusSetting)
|
||||||
val licenses = SettingKey[Seq[(String, URL)]]("licenses", "Project licenses as (name, url) pairs.", BMinusSetting)
|
val licenses = settingKey[Seq[(String, URL)]]("Project licenses as (name, url) pairs.").withRank(BMinusSetting)
|
||||||
val organization = SettingKey[String]("organization", "Organization/group ID.", APlusSetting)
|
val organization = settingKey[String]("Organization/group ID.").withRank(APlusSetting)
|
||||||
val organizationName = SettingKey[String]("organization-name", "Organization full/formal name.", BMinusSetting)
|
val organizationName = settingKey[String]("Organization full/formal name.").withRank(BMinusSetting)
|
||||||
val organizationHomepage = SettingKey[Option[URL]]("organization-homepage", "Organization homepage.", BMinusSetting)
|
val organizationHomepage = settingKey[Option[URL]]("Organization homepage.").withRank(BMinusSetting)
|
||||||
val developers = SettingKey[List[Developer]]("developers", "List of developers implicated in the project", BMinusSetting)
|
val developers = settingKey[List[Developer]]("List of developers implicated in the project").withRank(BMinusSetting)
|
||||||
val apiURL = SettingKey[Option[URL]]("api-url", "Base URL for API documentation.", BMinusSetting)
|
val apiURL = settingKey[Option[URL]]("Base URL for API documentation.").withRank(BMinusSetting)
|
||||||
val entryApiURL = AttributeKey[URL]("entry-api-url", "Base URL for the API documentation for a classpath entry.")
|
val entryApiURL = AttributeKey[URL]("entryApiURL", "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 apiMappings = taskKey[Map[File, URL]]("Mappings from classpath entry to API documentation base URL.").withRank(BMinusSetting)
|
||||||
val autoAPIMappings = SettingKey[Boolean]("auto-api-mappings", "If true, automatically manages mappings to the API doc URL.", BMinusSetting)
|
val autoAPIMappings = settingKey[Boolean]("If true, automatically manages mappings to the API doc URL.").withRank(BMinusSetting)
|
||||||
val scmInfo = SettingKey[Option[ScmInfo]]("scm-info", "Basic SCM information for the project.", BMinusSetting)
|
val scmInfo = settingKey[Option[ScmInfo]]("Basic SCM information for the project.").withRank(BMinusSetting)
|
||||||
val projectInfo = SettingKey[ModuleInfo]("project-info", "Addition project information like formal name, homepage, licenses etc.", CSetting)
|
val projectInfo = settingKey[ModuleInfo]("Addition project information like formal name, homepage, licenses etc.").withRank(CSetting)
|
||||||
val defaultConfiguration = SettingKey[Option[Configuration]]("default-configuration", "Defines the configuration used when none is specified for a dependency in ivyXML.", 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 products = taskKey[Seq[File]]("Build products that get packaged.").withRank(BMinusTask)
|
||||||
val productDirectories = TaskKey[Seq[File]]("product-directories", "Base directories of build products.", CTask)
|
val productDirectories = taskKey[Seq[File]]("Base directories of build products.").withRank(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 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]("exported-products", "Build products that go on the exported classpath.", CTask)
|
val exportedProducts = taskKey[Classpath]("Build products that go on the exported classpath.").withRank(CTask)
|
||||||
val exportedProductsIfMissing = TaskKey[Classpath]("exported-products-if-missing", "Build products that go on the exported classpath if missing.", CTask)
|
val exportedProductsIfMissing = taskKey[Classpath]("Build products that go on the exported classpath if missing.").withRank(CTask)
|
||||||
val exportedProductsNoTracking = TaskKey[Classpath]("exported-products-no-tracking", "Just the exported classpath without triggering the compilation.", CTask)
|
val exportedProductsNoTracking = taskKey[Classpath]("Just the exported classpath without triggering the compilation.").withRank(CTask)
|
||||||
val unmanagedClasspath = TaskKey[Classpath]("unmanaged-classpath", "Classpath entries (deep) that are manually managed.", BPlusTask)
|
val unmanagedClasspath = taskKey[Classpath]("Classpath entries (deep) that are manually managed.").withRank(BPlusTask)
|
||||||
val unmanagedJars = TaskKey[Classpath]("unmanaged-jars", "Classpath entries for the current project (shallow) that are manually managed.", BPlusTask)
|
val unmanagedJars = taskKey[Classpath]("Classpath entries for the current project (shallow) that are manually managed.").withRank(BPlusTask)
|
||||||
val managedClasspath = TaskKey[Classpath]("managed-classpath", "The classpath consisting of external, managed library dependencies.", BMinusTask)
|
val managedClasspath = taskKey[Classpath]("The classpath consisting of external, managed library dependencies.").withRank(BMinusTask)
|
||||||
val internalDependencyClasspath = TaskKey[Classpath]("internal-dependency-classpath", "The internal (inter-project) classpath.", CTask)
|
val internalDependencyClasspath = taskKey[Classpath]("The internal (inter-project) classpath.").withRank(CTask)
|
||||||
val externalDependencyClasspath = TaskKey[Classpath]("external-dependency-classpath", "The classpath consisting of library dependencies, both managed and unmanaged.", BMinusTask)
|
val externalDependencyClasspath = taskKey[Classpath]("The classpath consisting of library dependencies, both managed and unmanaged.").withRank(BMinusTask)
|
||||||
val dependencyClasspath = TaskKey[Classpath]("dependency-classpath", "The classpath consisting of internal and external, managed and unmanaged dependencies.", BPlusTask)
|
val dependencyClasspath = taskKey[Classpath]("The classpath consisting of internal and external, managed and unmanaged dependencies.").withRank(BPlusTask)
|
||||||
val fullClasspath = TaskKey[Classpath]("full-classpath", "The exported classpath, consisting of build products and unmanaged and managed, internal and external dependencies.", 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]("track-internal-dependencies", "The level of tracking for the internal (inter-project) dependency.", BSetting)
|
val trackInternalDependencies = settingKey[TrackLevel]("The level of tracking for the internal (inter-project) dependency.").withRank(BSetting)
|
||||||
val exportToInternal = SettingKey[TrackLevel]("export-to-internal", "The level of tracking for this project by the internal callers.", 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 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 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.")
|
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 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 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 internalConfigurationMap = settingKey[Configuration => Configuration]("Maps configurations to the actual configuration used to define the classpath.").withRank(CSetting)
|
||||||
val classpathConfiguration = TaskKey[Configuration]("classpath-configuration", "The configuration used to define the classpath.", CTask)
|
val classpathConfiguration = taskKey[Configuration]("The configuration used to define the classpath.").withRank(CTask)
|
||||||
val ivyConfiguration = TaskKey[IvyConfiguration]("ivy-configuration", "General dependency management (Ivy) settings, such as the resolvers and paths to use.", DTask)
|
val ivyConfiguration = taskKey[IvyConfiguration]("General dependency management (Ivy) settings, such as the resolvers and paths to use.").withRank(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 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
|
// 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 bootIvyConfiguration = taskKey[IvyConfiguration]("General dependency management (Ivy) settings, configured to retrieve sbt's components.").withRank(DTask)
|
||||||
val moduleSettings = TaskKey[ModuleSettings]("module-settings", "Module settings, which configure dependency management for a specific module, such as a project.", 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]("unmanaged-base", "The default directory for manually managed libraries.", ASetting)
|
val unmanagedBase = settingKey[File]("The default directory for manually managed libraries.").withRank(ASetting)
|
||||||
val updateConfiguration = SettingKey[UpdateConfiguration]("update-configuration", "Configuration for resolving and retrieving managed dependencies.", DSetting)
|
val updateConfiguration = settingKey[UpdateConfiguration]("Configuration for resolving and retrieving managed dependencies.").withRank(DSetting)
|
||||||
val updateOptions = SettingKey[UpdateOptions]("update-options", "Options for resolving managed dependencies.", DSetting)
|
val updateOptions = settingKey[UpdateOptions]("Options for resolving managed dependencies.").withRank(DSetting)
|
||||||
val unresolvedWarningConfiguration = TaskKey[UnresolvedWarningConfiguration]("unresolved-warning-configuration", "Configuration for unresolved dependency warning.", DTask)
|
val unresolvedWarningConfiguration = taskKey[UnresolvedWarningConfiguration]("Configuration for unresolved dependency warning.").withRank(DTask)
|
||||||
val dependencyPositions = TaskKey[Map[ModuleID, SourcePosition]]("dependency-positions", "Source positions where the dependencies are defined.", DTask)
|
val dependencyPositions = taskKey[Map[ModuleID, SourcePosition]]("Source positions where the dependencies are defined.").withRank(DTask)
|
||||||
val dependencyResolution = TaskKey[DependencyResolution]("dependency-resolution", "Provides the sbt interface to dependency resolution.", CTask)
|
val dependencyResolution = taskKey[DependencyResolution]("Provides the sbt interface to dependency resolution.").withRank(CTask)
|
||||||
val publisher = TaskKey[Publisher]("publisher", "Provides the sbt interface to publisher")
|
val publisher = taskKey[Publisher]("Provides the sbt interface to publisher")
|
||||||
val ivySbt = TaskKey[IvySbt]("ivy-sbt", "Provides the sbt interface to Ivy.", CTask)
|
val ivySbt = taskKey[IvySbt]("Provides the sbt interface to Ivy.").withRank(CTask)
|
||||||
val ivyModule = TaskKey[IvySbt#Module]("ivy-module", "Provides the sbt interface to a configured Ivy module.", CTask)
|
val ivyModule = taskKey[IvySbt#Module]("Provides the sbt interface to a configured Ivy module.").withRank(CTask)
|
||||||
val updateCacheName = TaskKey[String]("updateCacheName", "Defines the directory name used to store the update cache files (inside the streams cacheDirectory).", DTask)
|
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]("update", "Resolves and optionally retrieves dependencies, producing a report.", ATask)
|
val update = taskKey[UpdateReport]("Resolves and optionally retrieves dependencies, producing a report.").withRank(ATask)
|
||||||
val evicted = TaskKey[EvictionWarning]("evicted", "Display detailed eviction warnings.", CTask)
|
val evicted = taskKey[EvictionWarning]("Display detailed eviction warnings.").withRank(CTask)
|
||||||
val evictionWarningOptions = SettingKey[EvictionWarningOptions]("eviction-warning-options", "Options on eviction warnings after resolving managed dependencies.", DSetting)
|
val evictionWarningOptions = settingKey[EvictionWarningOptions]("Options on eviction warnings after resolving managed dependencies.").withRank(DSetting)
|
||||||
val transitiveUpdate = TaskKey[Seq[UpdateReport]]("transitive-update", "UpdateReports for the internal dependencies of this project.", DTask)
|
val transitiveUpdate = taskKey[Seq[UpdateReport]]("UpdateReports for the internal dependencies of this project.").withRank(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 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]]("transitive-classifiers", "List of classifiers used for transitively obtaining extra artifacts for sbt or declared dependencies.", BSetting)
|
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]("update-sbt-classifiers", "Resolves and optionally retrieves classifiers, such as javadocs and sources, for sbt, transitively.", BPlusTask, updateClassifiers)
|
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.") // BSetting
|
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.") // 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 publishConfiguration = taskKey[PublishConfiguration]("Configuration for publishing to a repository.").withRank(DTask)
|
||||||
val publishLocalConfiguration = TaskKey[PublishConfiguration]("publish-local-configuration", "Configuration for publishing to the local Ivy repository.", DTask)
|
val publishLocalConfiguration = taskKey[PublishConfiguration]("Configuration for publishing to the local Ivy repository.").withRank(DTask)
|
||||||
val publishM2Configuration = TaskKey[PublishConfiguration]("publish-m2-configuration", "Configuration for publishing to the local Maven repository.", DTask)
|
val publishM2Configuration = taskKey[PublishConfiguration]("Configuration for publishing to the local Maven repository.").withRank(DTask)
|
||||||
val makePomConfiguration = SettingKey[MakePomConfiguration]("make-pom-configuration", "Configuration for generating a pom.", DSetting)
|
val makePomConfiguration = settingKey[MakePomConfiguration]("Configuration for generating a pom.").withRank(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 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]("publish-maven-style", "Configures whether to generate and publish a pom (true) or Ivy file (false).", BSetting)
|
val publishMavenStyle = settingKey[Boolean]("Configures whether to generate and publish a pom (true) or Ivy file (false).").withRank(BSetting)
|
||||||
val credentials = TaskKey[Seq[Credentials]]("credentials", "The credentials to use for updating and publishing.", BMinusTask)
|
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 makePom = taskKey[File]("Generates a pom for publishing when publishing Maven-style.").withRank(BPlusTask)
|
||||||
val deliver = TaskKey[File]("deliver", "Generates the Ivy file for publishing to a repository.", BTask)
|
val deliver = taskKey[File]("Generates the Ivy file for publishing to a repository.").withRank(BTask)
|
||||||
val deliverLocal = TaskKey[File]("deliver-local", "Generates the Ivy file for publishing to the local repository.", BTask)
|
val deliverLocal = taskKey[File]("Generates the Ivy file for publishing to the local repository.").withRank(BTask)
|
||||||
val publish = TaskKey[Unit]("publish", "Publishes artifacts to a repository.", APlusTask)
|
val publish = taskKey[Unit]("Publishes artifacts to a repository.").withRank(APlusTask)
|
||||||
val publishLocal = TaskKey[Unit]("publish-local", "Publishes artifacts to the local Ivy repository.", APlusTask)
|
val publishLocal = taskKey[Unit]("Publishes artifacts to the local Ivy repository.").withRank(APlusTask)
|
||||||
val publishM2 = TaskKey[Unit]("publish-m2", "Publishes artifacts to the local Maven repository.", ATask)
|
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 pomExtra = settingKey[NodeSeq]("Extra XML to insert into the generated POM.").withRank(BSetting)
|
||||||
val pomPostProcess = SettingKey[XNode => XNode]("pom-post-process", "Transforms the generated POM.", CSetting)
|
val pomPostProcess = settingKey[XNode => XNode]("Transforms the generated POM.").withRank(CSetting)
|
||||||
val pomIncludeRepository = SettingKey[MavenRepository => Boolean]("pom-include-repository", "Selects repositories to include in the generated POM.", CSetting)
|
val pomIncludeRepository = settingKey[MavenRepository => Boolean]("Selects repositories to include in the generated POM.").withRank(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 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 moduleName = settingKey[String]("The name of the current module, used for dependency management.").withRank(BSetting)
|
||||||
val version = SettingKey[String]("version", "The version/revision of the current module.", APlusSetting)
|
val version = settingKey[String]("The version/revision of the current module.").withRank(APlusSetting)
|
||||||
val isSnapshot = SettingKey[Boolean]("is-snapshot", "True if the version of the project is a snapshot version.", BPlusSetting)
|
val isSnapshot = settingKey[Boolean]("True if the version of the project is a snapshot version.").withRank(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 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]("project-id", "The dependency management descriptor for the current module.", BMinusSetting)
|
val projectID = settingKey[ModuleID]("The dependency management descriptor for the current module.").withRank(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 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]]]("boot-resolvers", "The resolvers used by the sbt launcher.", BMinusSetting)
|
val bootResolvers = taskKey[Option[Seq[Resolver]]]("The resolvers used by the sbt launcher.").withRank(BMinusSetting)
|
||||||
val appResolvers = SettingKey[Option[Seq[Resolver]]]("app-resolvers", "The resolvers configured for this application by the sbt launcher.", BMinusSetting)
|
val appResolvers = settingKey[Option[Seq[Resolver]]]("The resolvers configured for this application by the sbt launcher.").withRank(BMinusSetting)
|
||||||
val externalResolvers = TaskKey[Seq[Resolver]]("external-resolvers", "The external resolvers for automatically managed dependencies.", BMinusSetting)
|
val externalResolvers = taskKey[Seq[Resolver]]("The external resolvers for automatically managed dependencies.").withRank(BMinusSetting)
|
||||||
val resolvers = SettingKey[Seq[Resolver]]("resolvers", "The user-defined additional resolvers for automatically managed dependencies.", BMinusTask)
|
val resolvers = settingKey[Seq[Resolver]]("The user-defined additional resolvers for automatically managed dependencies.").withRank(BMinusTask)
|
||||||
val projectResolver = TaskKey[Resolver]("project-resolver", "Resolver that handles inter-project dependencies.", DTask)
|
val projectResolver = taskKey[Resolver]("Resolver that handles inter-project dependencies.").withRank(DTask)
|
||||||
val fullResolvers = TaskKey[Seq[Resolver]]("full-resolvers", "Combines the project resolver, default resolvers, and user-defined resolvers.", CTask)
|
val fullResolvers = taskKey[Seq[Resolver]]("Combines the project resolver, default resolvers, and user-defined resolvers.").withRank(CTask)
|
||||||
val otherResolvers = TaskKey[Seq[Resolver]]("other-resolvers", "Resolvers not included in the main resolver chain, such as those in module configurations.", CSetting)
|
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", "Use JCenter as the default repository.", BSetting)
|
val useJCenter = settingKey[Boolean]("Use JCenter as the default repository.").withRank(BSetting)
|
||||||
val moduleConfigurations = SettingKey[Seq[ModuleConfiguration]]("module-configurations", "Defines module configurations, which override resolvers on a per-module basis.", BMinusSetting)
|
val moduleConfigurations = settingKey[Seq[ModuleConfiguration]]("Defines module configurations, which override resolvers on a per-module basis.").withRank(BMinusSetting)
|
||||||
val retrievePattern = SettingKey[String]("retrieve-pattern", "Pattern used to retrieve managed dependencies to the current build.", DSetting)
|
val retrievePattern = settingKey[String]("Pattern used to retrieve managed dependencies to the current build.").withRank(DSetting)
|
||||||
val retrieveConfiguration = SettingKey[Option[RetrieveConfiguration]]("retrieve-configuration", "Configures retrieving dependencies to the current build.", DSetting)
|
val retrieveConfiguration = settingKey[Option[RetrieveConfiguration]]("Configures retrieving dependencies to the current build.").withRank(DSetting)
|
||||||
val offline = SettingKey[Boolean]("offline", "Configures sbt to work without a network connection where possible.", ASetting)
|
val offline = settingKey[Boolean]("Configures sbt to work without a network connection where possible.").withRank(ASetting)
|
||||||
val ivyPaths = SettingKey[IvyPaths]("ivy-paths", "Configures paths used by Ivy for dependency management.", DSetting)
|
val ivyPaths = settingKey[IvyPaths]("Configures paths used by Ivy for dependency management.").withRank(DSetting)
|
||||||
val dependencyCacheDirectory = TaskKey[File]("dependency-cache-directory", "The base directory for cached dependencies.", DTask)
|
val dependencyCacheDirectory = taskKey[File]("The base directory for cached dependencies.").withRank(DTask)
|
||||||
val libraryDependencies = SettingKey[Seq[ModuleID]]("library-dependencies", "Declares managed dependencies.", APlusSetting)
|
val libraryDependencies = settingKey[Seq[ModuleID]]("Declares managed dependencies.").withRank(APlusSetting)
|
||||||
val dependencyOverrides = SettingKey[Seq[ModuleID]]("dependency-overrides", "Declares managed dependency overrides.", BSetting)
|
val dependencyOverrides = settingKey[Seq[ModuleID]]("Declares managed dependency overrides.").withRank(BSetting)
|
||||||
val excludeDependencies = SettingKey[Seq[InclExclRule]]("exclude-dependencies", "Declares managed dependency exclusions.", BSetting)
|
val excludeDependencies = settingKey[Seq[InclExclRule]]("Declares managed dependency exclusions.").withRank(BSetting)
|
||||||
val allDependencies = TaskKey[Seq[ModuleID]]("all-dependencies", "Inter-project and library dependencies.", CTask)
|
val allDependencies = taskKey[Seq[ModuleID]]("Inter-project and library dependencies.").withRank(CTask)
|
||||||
val projectDependencies = TaskKey[Seq[ModuleID]]("project-dependencies", "Inter-project dependencies.", DTask)
|
val projectDependencies = taskKey[Seq[ModuleID]]("Inter-project dependencies.").withRank(DTask)
|
||||||
val ivyXML = SettingKey[NodeSeq]("ivy-xml", "Defines inline Ivy XML for configuring dependency management.", BSetting)
|
val ivyXML = settingKey[NodeSeq]("Defines inline Ivy XML for configuring dependency management.").withRank(BSetting)
|
||||||
val scalaModuleInfo = SettingKey[Option[ScalaModuleInfo]]("scala-module-info", "Configures how Scala dependencies are checked, filtered, and injected.", CSetting)
|
val scalaModuleInfo = settingKey[Option[ScalaModuleInfo]]("Configures how Scala dependencies are checked, filtered, and injected.").withRank(CSetting)
|
||||||
val ivyValidate = SettingKey[Boolean]("ivy-validate", "Enables/disables Ivy validation of module metadata.", BSetting)
|
val ivyValidate = settingKey[Boolean]("Enables/disables Ivy validation of module metadata.").withRank(BSetting)
|
||||||
val ivyLoggingLevel = SettingKey[UpdateLogging]("ivy-logging-level", "The logging level for updating.", BSetting)
|
val ivyLoggingLevel = settingKey[UpdateLogging]("The logging level for updating.").withRank(BSetting)
|
||||||
val publishTo = TaskKey[Option[Resolver]]("publish-to", "The resolver to publish to.", ASetting)
|
val publishTo = taskKey[Option[Resolver]]("The resolver to publish to.").withRank(ASetting)
|
||||||
val artifacts = SettingKey[Seq[Artifact]]("artifacts", "The artifact definitions for the current module. Must be consistent with " + packagedArtifacts.key.label + ".", BSetting)
|
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-descriptors", "Project dependency map for the inter-project resolver.", DTask)
|
val projectDescriptors = taskKey[Map[ModuleRevisionId, ModuleDescriptor]]("Project dependency map for the inter-project resolver.").withRank(DTask)
|
||||||
val autoUpdate = SettingKey[Boolean]("auto-update", "<unimplemented>", Invisible)
|
val autoUpdate = settingKey[Boolean]("<unimplemented>").withRank(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 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]("retrieve-managed-sync", "If true, enables synchronizing the dependencies retrieved to the current build by removed unneeded files.", 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]]]("configurations-to-retrieve", "An optional set of configurations from which to retrieve dependencies if retrieveManaged is set to true", 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]("managed-directory", "Directory to which managed dependencies are retrieved.", BSetting)
|
val managedDirectory = settingKey[File]("Directory to which managed dependencies are retrieved.").withRank(BSetting)
|
||||||
val classpathTypes = SettingKey[Set[String]]("classpath-types", "Artifact types that are included on the classpath.", BSetting)
|
val classpathTypes = settingKey[Set[String]]("Artifact types that are included on the classpath.").withRank(BSetting)
|
||||||
val publishArtifact = SettingKey[Boolean]("publish-artifact", "Enables (true) or disables (false) publishing an artifact.", AMinusSetting)
|
val publishArtifact = settingKey[Boolean]("Enables (true) or disables (false) publishing an artifact.").withRank(AMinusSetting)
|
||||||
val packagedArtifact = TaskKey[(Artifact, File)]("packaged-artifact", "Generates a packaged artifact, returning the Artifact and the produced File.", CTask)
|
val packagedArtifact = taskKey[(Artifact, File)]("Generates a packaged artifact, returning the Artifact and the produced File.").withRank(CTask)
|
||||||
val checksums = SettingKey[Seq[String]]("checksums", "The list of checksums to generate and to verify for dependencies.", BSetting)
|
val checksums = settingKey[Seq[String]]("The list of checksums to generate and to verify for dependencies.").withRank(BSetting)
|
||||||
val forceUpdatePeriod = SettingKey[Option[FiniteDuration]]("force-update-period", "Duration after which to force a full update to occur", CSetting)
|
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 classifiersModule = taskKey[GetClassifiersModule]("classifiers-module").withRank(CTask)
|
||||||
val compatibilityWarningOptions = SettingKey[CompatibilityWarningOptions]("compatibility-warning", "Configures warnings around Maven incompatibility.", CSetting)
|
val compatibilityWarningOptions = settingKey[CompatibilityWarningOptions]("Configures warnings around Maven incompatibility.").withRank(CSetting)
|
||||||
val conflictWarning = SettingKey[ConflictWarning]("conflict-warning", "Configures warnings for conflicts in dependency management.", CSetting)
|
val conflictWarning = settingKey[ConflictWarning]("Configures warnings for conflicts in dependency management.").withRank(CSetting)
|
||||||
val conflictManager = SettingKey[ConflictManager]("conflict-manager", "Selects the conflict manager to use for dependency management.", CSetting)
|
val conflictManager = settingKey[ConflictManager]("Selects the conflict manager to use for dependency management.").withRank(CSetting)
|
||||||
val autoScalaLibrary = SettingKey[Boolean]("auto-scala-library", "Adds a dependency on scala-library if true.", ASetting)
|
val autoScalaLibrary = settingKey[Boolean]("Adds a dependency on scala-library if true.").withRank(ASetting)
|
||||||
val managedScalaInstance = SettingKey[Boolean]("managed-scala-instance", "Automatically obtains Scala tools as managed dependencies if true.", BSetting)
|
val managedScalaInstance = settingKey[Boolean]("Automatically obtains Scala tools as managed dependencies if true.").withRank(BSetting)
|
||||||
val sbtResolver = SettingKey[Resolver]("sbt-resolver", "Provides a resolver for obtaining sbt as a dependency.", BMinusSetting)
|
val sbtResolver = settingKey[Resolver]("Provides a resolver for obtaining sbt as a dependency.").withRank(BMinusSetting)
|
||||||
val sbtDependency = SettingKey[ModuleID]("sbt-dependency", "Provides a definition for declaring the current version of sbt.", BMinusSetting)
|
val sbtDependency = settingKey[ModuleID]("Provides a definition for declaring the current version of sbt.").withRank(BMinusSetting)
|
||||||
val sbtVersion = SettingKey[String]("sbt-version", "Provides the version of sbt. This setting should not be modified.", AMinusSetting)
|
val sbtVersion = settingKey[String]("Provides the version of sbt. This setting should not be modified.").withRank(AMinusSetting)
|
||||||
val sbtBinaryVersion = SettingKey[String]("sbt-binary-version", "Defines the binary compatibility version substring.", BPlusSetting)
|
val sbtBinaryVersion = settingKey[String]("Defines the binary compatibility version substring.").withRank(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 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]]("templateResolverInfos", "Template resolvers used for 'new'.", BSetting)
|
val templateResolverInfos = settingKey[Seq[TemplateResolverInfo]]("Template resolvers used for 'new'.").withRank(BSetting)
|
||||||
val interactionService = TaskKey[InteractionService]("interactionService", "Service used to ask for user input through the current user interface(s).", CTask)
|
val interactionService = taskKey[InteractionService]("Service used to ask for user input through the current user interface(s).").withRank(CTask)
|
||||||
|
|
||||||
// special
|
// special
|
||||||
val sessionVars = AttributeKey[SessionVar.Map]("session-vars", "Bindings that exist for the duration of the session.", Invisible)
|
val sessionVars = AttributeKey[SessionVar.Map]("sessionVars", "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 parallelExecution = settingKey[Boolean]("Enables (true) or disables (false) parallel execution of tasks.").withRank(BMinusSetting)
|
||||||
val tags = SettingKey[Seq[(Tags.Tag, Int)]]("tags", ConcurrentRestrictions.tagsKey.label, BSetting)
|
val tags = settingKey[Seq[(Tags.Tag, Int)]](ConcurrentRestrictions.tagsKey.description.getOrElse("tags")).withRank(BSetting)
|
||||||
val concurrentRestrictions = SettingKey[Seq[Tags.Rule]]("concurrent-restrictions", "Rules describing restrictions on concurrent task execution.", BSetting)
|
val concurrentRestrictions = settingKey[Seq[Tags.Rule]]("Rules describing restrictions on concurrent task execution.").withRank(BSetting)
|
||||||
val cancelable = SettingKey[Boolean]("cancelable", "Enables (true) or disables (false) the ability to interrupt task execution with CTRL+C.", BMinusSetting)
|
val cancelable = settingKey[Boolean]("Enables (true) or disables (false) the ability to interrupt task execution with CTRL+C.").withRank(BMinusSetting)
|
||||||
val forcegc = SettingKey[Boolean]("forcegc", "Enables (true) or disables (false) forcing garbage collection after task run when needed.", BMinusSetting)
|
val forcegc = settingKey[Boolean]("Enables (true) or disables (false) forcing garbage collection after task run when needed.").withRank(BMinusSetting)
|
||||||
val minForcegcInterval = SettingKey[Duration]("min-forcegc-interval", "Minimal interval to check for forcing garbage collection.")
|
val minForcegcInterval = settingKey[Duration]("Minimal interval to check for forcing garbage collection.")
|
||||||
val settingsData = std.FullInstance.settingsData
|
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 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 state = Def.stateKey
|
||||||
val streamsManager = Def.streamsManagerKey
|
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 resolvedScoped = Def.resolvedScoped
|
||||||
val pluginData = TaskKey[PluginData]("plugin-data", "Information from the plugin build needed in the main build definition.", DTask)
|
val pluginData = taskKey[PluginData]("Information from the plugin build needed in the main build definition.").withRank(DTask)
|
||||||
val globalPluginUpdate = TaskKey[UpdateReport]("global-plugin-update", "A hook to get the UpdateReport of the global plugin.", DTask)
|
val globalPluginUpdate = taskKey[UpdateReport]("A hook to get the UpdateReport of the global plugin.").withRank(DTask)
|
||||||
|
|
||||||
// wrapper to work around SI-2915
|
// wrapper to work around SI-2915
|
||||||
private[sbt] final class TaskProgress(val progress: ExecuteProgress[Task])
|
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 executeProgress = settingKey[State => TaskProgress]("Experimental task execution listener.").withRank(DTask)
|
||||||
private[sbt] val taskCancelStrategy = SettingKey[State => TaskCancellationStrategy]("taskCancelStrategy", "Experimental task cancellation handler.", 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.
|
// 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 triggeredBy = Def.triggeredBy
|
||||||
val runBefore = Def.runBefore
|
val runBefore = Def.runBefore
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,9 @@ import Def.ScopedKey
|
||||||
import sbt.internal.Load
|
import sbt.internal.Load
|
||||||
import sbt.internal.CommandStrings._
|
import sbt.internal.CommandStrings._
|
||||||
import Cross.{ spacedFirst, requireSession }
|
import Cross.{ spacedFirst, requireSession }
|
||||||
|
import sbt.librarymanagement.Configurations._
|
||||||
|
import sbt.librarymanagement.VersionNumber
|
||||||
|
import Project.{ inConfig, inScope }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module responsible for plugin cross building.
|
* Module responsible for plugin cross building.
|
||||||
|
|
@ -42,7 +45,11 @@ private[sbt] object PluginCross {
|
||||||
val x = Project.extract(state)
|
val x = Project.extract(state)
|
||||||
import x._
|
import x._
|
||||||
state.log.info(s"Setting `sbtVersion in pluginCrossBuild` to $version")
|
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 cleared = session.mergeSettings.filterNot(crossExclude)
|
||||||
val newStructure = Load.reapply(cleared ++ add, structure)
|
val newStructure = Load.reapply(cleared ++ add, structure)
|
||||||
Project.setProject(session, newStructure, command :: state)
|
Project.setProject(session, newStructure, command :: state)
|
||||||
|
|
@ -74,4 +81,20 @@ private[sbt] object PluginCross {
|
||||||
else versions.map(PluginSwitchCommand + " " + _ + " " + command) ::: current ::: state
|
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")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ import java.util.Locale
|
||||||
|
|
||||||
import scala.sys.process.Process
|
import scala.sys.process.Process
|
||||||
import scala.util.control.NonFatal
|
import scala.util.control.NonFatal
|
||||||
|
import sbt.internal.util.Util
|
||||||
|
|
||||||
object Resolvers {
|
object Resolvers {
|
||||||
type Resolver = BuildLoader.Resolver
|
type Resolver = BuildLoader.Resolver
|
||||||
|
|
@ -125,20 +126,12 @@ object Resolvers {
|
||||||
private def normalized(uri: URI) = uri.copy(scheme = scheme)
|
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 =
|
def run(command: String*): Unit =
|
||||||
run(None, command: _*)
|
run(None, command: _*)
|
||||||
|
|
||||||
def run(cwd: Option[File], command: String*): Unit = {
|
def run(cwd: Option[File], command: String*): Unit = {
|
||||||
val result = Process(
|
val result = Process(
|
||||||
if (onWindows) "cmd" +: "/c" +: command
|
if (Util.isNonCygwinWindows) "cmd" +: "/c" +: command
|
||||||
else command,
|
else command,
|
||||||
cwd
|
cwd
|
||||||
) !;
|
) !;
|
||||||
|
|
|
||||||
|
|
@ -114,11 +114,9 @@ private[sbt] object TemplateCommandUtil {
|
||||||
if (!(info.module.revision endsWith "-SNAPSHOT") && jars.nonEmpty) jars.toList
|
if (!(info.module.revision endsWith "-SNAPSHOT") && jars.nonEmpty) jars.toList
|
||||||
else {
|
else {
|
||||||
IO.createDirectory(templateDirectory)
|
IO.createDirectory(templateDirectory)
|
||||||
val m = lm.moduleDescriptor(info.module.withConfigurations(Some("component")),
|
val m = lm.wrapDependencyInModule(info.module, scalaModuleInfo)
|
||||||
Vector.empty,
|
|
||||||
scalaModuleInfo)
|
|
||||||
val xs = lm.retrieve(m, templateDirectory, log) match {
|
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
|
case Right(files) => files.toList
|
||||||
}
|
}
|
||||||
xs
|
xs
|
||||||
|
|
|
||||||
|
|
@ -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]])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,29 +3,25 @@ package sbt.internal
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
import sbt.internal.librarymanagement._
|
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._
|
||||||
import sbt.librarymanagement.ivy._
|
|
||||||
import sbt.librarymanagement.syntax._
|
import sbt.librarymanagement.syntax._
|
||||||
import sbt.util.{ CacheStore, CacheStoreFactory, Logger, Tracked }
|
import sbt.util.{ CacheStore, CacheStoreFactory, Logger, Tracked }
|
||||||
|
|
||||||
private[sbt] object LibraryManagement {
|
private[sbt] object LibraryManagement {
|
||||||
|
|
||||||
private type UpdateInputs = IvyConfiguration :+: ModuleSettings :+: UpdateConfiguration :+: HNil
|
private type UpdateInputs = (Long, ModuleSettings, UpdateConfiguration)
|
||||||
|
|
||||||
def cachedUpdate(
|
def cachedUpdate(
|
||||||
|
lm: DependencyResolution,
|
||||||
|
module: ModuleDescriptor,
|
||||||
cacheStoreFactory: CacheStoreFactory,
|
cacheStoreFactory: CacheStoreFactory,
|
||||||
label: String,
|
label: String,
|
||||||
module: IvySbt#Module,
|
|
||||||
updateConfig: UpdateConfiguration,
|
updateConfig: UpdateConfiguration,
|
||||||
transform: UpdateReport => UpdateReport,
|
transform: UpdateReport => UpdateReport,
|
||||||
skip: Boolean,
|
skip: Boolean,
|
||||||
force: Boolean,
|
force: Boolean,
|
||||||
depsUpdated: Boolean,
|
depsUpdated: Boolean,
|
||||||
uwConfig: UnresolvedWarningConfiguration,
|
uwConfig: UnresolvedWarningConfiguration,
|
||||||
depDir: Option[File],
|
|
||||||
ewo: EvictionWarningOptions,
|
ewo: EvictionWarningOptions,
|
||||||
mavenStyle: Boolean,
|
mavenStyle: Boolean,
|
||||||
compatWarning: CompatibilityWarningOptions,
|
compatWarning: CompatibilityWarningOptions,
|
||||||
|
|
@ -39,7 +35,7 @@ private[sbt] object LibraryManagement {
|
||||||
log.info(s"Updating $label...")
|
log.info(s"Updating $label...")
|
||||||
val reportOrUnresolved: Either[UnresolvedWarning, UpdateReport] =
|
val reportOrUnresolved: Either[UnresolvedWarning, UpdateReport] =
|
||||||
//try {
|
//try {
|
||||||
IvyActions.updateEither(module, updateConfig, uwConfig, /*logicalClock, depDir,*/ log)
|
lm.update(module, updateConfig, uwConfig, log)
|
||||||
// } catch {
|
// } catch {
|
||||||
// case e: Throwable =>
|
// case e: Throwable =>
|
||||||
// e.printStackTrace
|
// e.printStackTrace
|
||||||
|
|
@ -107,18 +103,19 @@ private[sbt] object LibraryManagement {
|
||||||
}
|
}
|
||||||
.apply(cachedResolve(updateInputs))
|
.apply(cachedResolve(updateInputs))
|
||||||
}
|
}
|
||||||
import AltLibraryManagementCodec._
|
import LibraryManagementCodec._
|
||||||
Tracked.inputChanged(cacheStoreFactory.make("inputs"))(doCachedResolve)
|
Tracked.inputChanged(cacheStoreFactory.make("inputs"))(doCachedResolve)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the handler to use and feed it in the inputs
|
// 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 settings = module.moduleSettings
|
||||||
val outStore = cacheStoreFactory.make("output")
|
val outStore = cacheStoreFactory.make("output")
|
||||||
val handler = if (skip && !force) skipResolve(outStore) else doResolve(outStore)
|
val handler = if (skip && !force) skipResolve(outStore) else doResolve(outStore)
|
||||||
// Remove clock for caching purpose
|
// Remove clock for caching purpose
|
||||||
val withoutClock = updateConfig.withLogicalClock(LogicalClock.unknown)
|
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 =
|
private[this] def fileUptodate(file: File, stamps: Map[File, Long]): Boolean =
|
||||||
|
|
|
||||||
|
|
@ -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 `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 `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 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)
|
- 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.
|
- `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]
|
- 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 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`.
|
- 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.
|
- 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].
|
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.
|
- New incremental compiler called Zinc 1. Details below.
|
||||||
- The interactive shell is adds network API. 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
|
#### 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 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 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]
|
- 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]
|
- 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]
|
- `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 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].
|
- 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]
|
- 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 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]
|
- 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.
|
- 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.
|
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
|
#### 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.
|
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
|
#### notes
|
||||||
|
|
||||||
- https://github.com/sbt/sbt/compare/v1.0.0-M6...1.0.x
|
- https://github.com/sbt/sbt/compare/v1.0.0-RC2...v1.0.0-RC3
|
||||||
- https://github.com/sbt/zinc/compare/v1.0.0-X16...v1.0.0-X20
|
- https://github.com/sbt/zinc/compare/v1.0.0-X20...v1.0.0-RC3
|
||||||
- https://github.com/sbt/librarymanagement/compare/v1.0.0-X15...v1.0.0-X18
|
- https://github.com/sbt/librarymanagement/compare/v1.0.0-X18...v1.0.0-RC3
|
||||||
- https://github.com/sbt/util/compare/v1.0.0-M24...v1.0.0-M28
|
- https://github.com/sbt/util/compare/v1.0.0-M28...v1.0.0-RC3
|
||||||
- https://github.com/sbt/io/compare/v1.0.0-M11...v1.0.0-M13
|
- https://github.com/sbt/io/compare/v1.0.0-M13...v1.0.0-RC3
|
||||||
|
|
||||||
[@eed3si9n]: https://github.com/eed3si9n
|
[@eed3si9n]: https://github.com/eed3si9n
|
||||||
[@dwijnand]: http://github.com/dwijnand
|
[@dwijnand]: http://github.com/dwijnand
|
||||||
|
|
@ -269,11 +288,14 @@ that would should work together to allow dependency locking.
|
||||||
[@Krever]: https://github.com/Krever
|
[@Krever]: https://github.com/Krever
|
||||||
[@lukeindykiewicz]: https://github.com/lukeindykiewicz
|
[@lukeindykiewicz]: https://github.com/lukeindykiewicz
|
||||||
[@gheine]: https://github.com/gheine
|
[@gheine]: https://github.com/gheine
|
||||||
|
[@xuwei-k]: https://github.com/xuwei-k
|
||||||
[840]: https://github.com/sbt/sbt/issues/840
|
[840]: https://github.com/sbt/sbt/issues/840
|
||||||
[2613]: https://github.com/sbt/sbt/pull/2613
|
[2613]: https://github.com/sbt/sbt/pull/2613
|
||||||
[1911]: https://github.com/sbt/sbt/issues/1911
|
[1911]: https://github.com/sbt/sbt/issues/1911
|
||||||
[2059]: https://github.com/sbt/sbt/issues/2059
|
[2059]: https://github.com/sbt/sbt/issues/2059
|
||||||
[2662]: https://github.com/sbt/sbt/pull/2662
|
[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
|
[util80]: https://github.com/sbt/util/pull/80
|
||||||
[3198]: https://github.com/sbt/sbt/issues/3198
|
[3198]: https://github.com/sbt/sbt/issues/3198
|
||||||
[lm88]: https://github.com/sbt/librarymanagement/pull/88
|
[lm88]: https://github.com/sbt/librarymanagement/pull/88
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -8,14 +8,14 @@ object Dependencies {
|
||||||
val scala293 = "2.9.3"
|
val scala293 = "2.9.3"
|
||||||
val scala210 = "2.10.6"
|
val scala210 = "2.10.6"
|
||||||
val scala211 = "2.11.8"
|
val scala211 = "2.11.8"
|
||||||
val scala212 = "2.12.2"
|
val scala212 = "2.12.3"
|
||||||
val baseScalaVersion = scala212
|
val baseScalaVersion = scala212
|
||||||
|
|
||||||
// sbt modules
|
// sbt modules
|
||||||
private val ioVersion = "1.0.0-M12"
|
private val ioVersion = "1.0.0-RC3"
|
||||||
private val utilVersion = "1.0.0-M28"
|
private val utilVersion = "1.0.0-RC3"
|
||||||
private val lmVersion = "1.0.0-X18"
|
private val lmVersion = "1.0.0-RC3"
|
||||||
private val zincVersion = "1.0.0-X20"
|
private val zincVersion = "1.0.0-RC3"
|
||||||
|
|
||||||
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
private val sbtIO = "org.scala-sbt" %% "io" % ioVersion
|
||||||
|
|
||||||
|
|
@ -113,4 +113,11 @@ object Dependencies {
|
||||||
|
|
||||||
val scalaXml = scala211Module("scala-xml", "1.0.6")
|
val scalaXml = scala211Module("scala-xml", "1.0.6")
|
||||||
val scalaParsers = scala211Module("scala-parser-combinators", "1.0.5")
|
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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import com.typesafe.sbt.site.SitePlugin.autoImport._
|
||||||
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
|
import com.typesafe.sbt.site.SiteScaladocPlugin.autoImport._
|
||||||
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._
|
import com.typesafe.sbt.sbtghpages.GhpagesPlugin.autoImport._
|
||||||
import com.typesafe.sbt.SbtGit, SbtGit.{ git, GitKeys }
|
import com.typesafe.sbt.SbtGit, SbtGit.{ git, GitKeys }
|
||||||
import Sxr.{ sxr, sxrConf }
|
import Sxr.{ sxr, SxrConf }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
object Docs {
|
object Docs {
|
||||||
|
|
@ -37,8 +37,8 @@ object Docs {
|
||||||
|
|
||||||
def siteIncludeSxr(prefix: String) = Def settings (
|
def siteIncludeSxr(prefix: String) = Def settings (
|
||||||
mappings in sxr := Path.allSubpaths(sxr.value).toSeq,
|
mappings in sxr := Path.allSubpaths(sxr.value).toSeq,
|
||||||
siteSubdirName in sxrConf := prefix,
|
siteSubdirName in SxrConf := prefix,
|
||||||
addMappingsToSiteDir(mappings in sxr, siteSubdirName in sxrConf)
|
addMappingsToSiteDir(mappings in sxr, siteSubdirName in SxrConf)
|
||||||
)
|
)
|
||||||
|
|
||||||
def synchLocalImpl = Def task {
|
def synchLocalImpl = Def task {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import sbt._, Keys._
|
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. */
|
/** This local plugin provides ways of publishing just the binary jar. */
|
||||||
object PublishBinPlugin extends AutoPlugin {
|
object PublishBinPlugin extends AutoPlugin {
|
||||||
|
|
@ -18,13 +19,24 @@ object PublishBinPlugin extends AutoPlugin {
|
||||||
|
|
||||||
override def projectSettings = Def settings (
|
override def projectSettings = Def settings (
|
||||||
publishLocalBin := Classpaths.publishTask(publishLocalBinConfig, deliverLocal).value,
|
publishLocalBin := Classpaths.publishTask(publishLocalBinConfig, deliverLocal).value,
|
||||||
publishLocalBinConfig := Classpaths.publishConfig(
|
|
||||||
(packagedArtifacts in publishLocalBin).value,
|
publishLocalBinConfig := {
|
||||||
Some(deliverLocal.value),
|
val _ = deliverLocal.value
|
||||||
(checksums in publishLocalBin).value,
|
Classpaths.publishConfig(
|
||||||
logging = ivyLoggingLevel.value,
|
publishMavenStyle.value,
|
||||||
overwrite = isSnapshot.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
|
packagedArtifacts in publishLocalBin := Classpaths.packaged(Seq(packageBin in Compile)).value
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def deliverPattern(outputPath: File): String =
|
||||||
|
(outputPath / "[artifact]-[revision](-[classifier]).[ext]").absolutePath
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import sbt.io.Path._
|
import sbt.io.Path._
|
||||||
import sbt._
|
import sbt._
|
||||||
import Keys._
|
import Keys._
|
||||||
|
import sbt.io.CopyOptions
|
||||||
|
|
||||||
object SbtLauncherPlugin extends AutoPlugin {
|
object SbtLauncherPlugin extends AutoPlugin {
|
||||||
override def requires = plugins.IvyPlugin
|
override def requires = plugins.IvyPlugin
|
||||||
|
|
@ -40,7 +41,7 @@ object SbtLauncherPlugin extends AutoPlugin {
|
||||||
// TODO - Check if we should rebuild the jar or not....
|
// TODO - Check if we should rebuild the jar or not....
|
||||||
IO.withTemporaryDirectory { dir =>
|
IO.withTemporaryDirectory { dir =>
|
||||||
IO.unzip(jar, 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?
|
// TODO - is the ok for creating a jar?
|
||||||
IO.zip((dir.allPaths --- dir) pair relativeTo(dir), target)
|
IO.zip((dir.allPaths --- dir) pair relativeTo(dir), target)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,22 +2,20 @@ import sbt._
|
||||||
import Keys._
|
import Keys._
|
||||||
import Scope.ThisScope
|
import Scope.ThisScope
|
||||||
|
|
||||||
import sbt.librarymanagement.syntax._
|
|
||||||
|
|
||||||
import sbt.internal.inc.RawCompiler
|
import sbt.internal.inc.RawCompiler
|
||||||
|
|
||||||
object Sxr {
|
object Sxr {
|
||||||
val sxrConf = config("sxr").hide
|
val SxrConf = config("sxr").hide
|
||||||
val sxr = TaskKey[File]("sxr")
|
val sxr = TaskKey[File]("sxr")
|
||||||
val sourceDirectories = TaskKey[Seq[File]]("sxr-source-directories")
|
val sourceDirectories = TaskKey[Seq[File]]("sxr-source-directories")
|
||||||
|
|
||||||
lazy val settings: Seq[Setting[_]] = inTask(sxr)(inSxrSettings) ++ baseSettings
|
lazy val settings: Seq[Setting[_]] = inTask(sxr)(inSxrSettings) ++ baseSettings
|
||||||
|
|
||||||
def baseSettings = Seq(
|
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(
|
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 += "-P:sxr:base-directory:" + sourceDirectories.value.absString,
|
||||||
scalacOptions += "-Xplugin:" + managedClasspath.value.files
|
scalacOptions += "-Xplugin:" + managedClasspath.value.files
|
||||||
.filter(_.getName.contains("sxr"))
|
.filter(_.getName.contains("sxr"))
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
sbt.version=1.0.0-M6
|
sbt.version=1.0.0-RC3
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
scalaVersion := "2.12.2"
|
scalaVersion := "2.12.3"
|
||||||
scalacOptions ++= Seq("-feature", "-language:postfixOps")
|
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-ghpages" % "0.6.0")
|
||||||
// addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.2")
|
// addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.2")
|
||||||
// addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
|
// addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
|
||||||
// addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.2.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.jsuereth" % "sbt-pgp" % "1.1.0-M1")
|
||||||
addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.3")
|
// addSbtPlugin("com.lucidchart" % "sbt-scalafmt" % "1.3")
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,9 @@
|
||||||
package sbt
|
package sbt
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.Locale
|
|
||||||
import scala.sys.process.Process
|
import scala.sys.process.Process
|
||||||
import OutputStrategy._
|
import OutputStrategy._
|
||||||
|
import sbt.internal.util.Util
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a command that can be forked.
|
* Represents a command that can be forked.
|
||||||
|
|
@ -80,15 +80,13 @@ object Fork {
|
||||||
private[this] val MaxConcatenatedOptionLength = 5000
|
private[this] val MaxConcatenatedOptionLength = 5000
|
||||||
|
|
||||||
private def fitClasspath(options: Seq[String]): (Option[String], Seq[String]) =
|
private def fitClasspath(options: Seq[String]): (Option[String], Seq[String]) =
|
||||||
if (isWindows && optionsTooLong(options))
|
if (Util.isWindows && optionsTooLong(options))
|
||||||
convertClasspathToEnv(options)
|
convertClasspathToEnv(options)
|
||||||
else
|
else
|
||||||
(None, options)
|
(None, options)
|
||||||
private[this] def optionsTooLong(options: Seq[String]): Boolean =
|
private[this] def optionsTooLong(options: Seq[String]): Boolean =
|
||||||
options.mkString(" ").length > MaxConcatenatedOptionLength
|
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]) = {
|
private[this] def convertClasspathToEnv(options: Seq[String]): (Option[String], Seq[String]) = {
|
||||||
val (preCP, cpAndPost) = options.span(opt => !isClasspathOption(opt))
|
val (preCP, cpAndPost) = options.span(opt => !isClasspathOption(opt))
|
||||||
val postCP = cpAndPost.drop(2)
|
val postCP = cpAndPost.drop(2)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ trait Import {
|
||||||
type URI = java.net.URI
|
type URI = java.net.URI
|
||||||
type URL = java.net.URL
|
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
|
// sbt
|
||||||
val StdoutOutput = sbt.OutputStrategy.StdoutOutput
|
val StdoutOutput = sbt.OutputStrategy.StdoutOutput
|
||||||
|
|
@ -27,6 +28,8 @@ trait Import {
|
||||||
|
|
||||||
// sbt.io
|
// sbt.io
|
||||||
val AllPassFilter = sbt.io.AllPassFilter
|
val AllPassFilter = sbt.io.AllPassFilter
|
||||||
|
val CopyOptions = sbt.io.CopyOptions
|
||||||
|
type CopyOptions = sbt.io.CopyOptions
|
||||||
val DirectoryFilter = sbt.io.DirectoryFilter
|
val DirectoryFilter = sbt.io.DirectoryFilter
|
||||||
type ExactFilter = sbt.io.ExactFilter
|
type ExactFilter = sbt.io.ExactFilter
|
||||||
val ExistsFileFilter = sbt.io.ExistsFileFilter
|
val ExistsFileFilter = sbt.io.ExistsFileFilter
|
||||||
|
|
@ -229,6 +232,8 @@ trait Import {
|
||||||
type ChainedResolver = sbt.librarymanagement.ChainedResolver
|
type ChainedResolver = sbt.librarymanagement.ChainedResolver
|
||||||
val CircularDependencyLevel = sbt.librarymanagement.ivy.CircularDependencyLevel
|
val CircularDependencyLevel = sbt.librarymanagement.ivy.CircularDependencyLevel
|
||||||
type 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
|
val Configuration = sbt.librarymanagement.Configuration
|
||||||
type Configuration = sbt.librarymanagement.Configuration
|
type Configuration = sbt.librarymanagement.Configuration
|
||||||
val ConfigurationReport = sbt.librarymanagement.ConfigurationReport
|
val ConfigurationReport = sbt.librarymanagement.ConfigurationReport
|
||||||
|
|
@ -294,6 +299,8 @@ trait Import {
|
||||||
val Patterns = sbt.librarymanagement.Patterns
|
val Patterns = sbt.librarymanagement.Patterns
|
||||||
type Patterns = sbt.librarymanagement.Patterns
|
type Patterns = sbt.librarymanagement.Patterns
|
||||||
type PatternsBasedRepository = sbt.librarymanagement.PatternsBasedRepository
|
type PatternsBasedRepository = sbt.librarymanagement.PatternsBasedRepository
|
||||||
|
val PublishConfiguration = sbt.librarymanagement.PublishConfiguration
|
||||||
|
type PublishConfiguration = sbt.librarymanagement.PublishConfiguration
|
||||||
type RawRepository = sbt.librarymanagement.RawRepository
|
type RawRepository = sbt.librarymanagement.RawRepository
|
||||||
val Resolver = sbt.librarymanagement.Resolver
|
val Resolver = sbt.librarymanagement.Resolver
|
||||||
type Resolver = sbt.librarymanagement.Resolver
|
type Resolver = sbt.librarymanagement.Resolver
|
||||||
|
|
|
||||||
|
|
@ -34,38 +34,33 @@ lazy val root = (project in file("."))
|
||||||
val cacheStoreFactory = s.cacheStoreFactory sub updateCacheName.value
|
val cacheStoreFactory = s.cacheStoreFactory sub updateCacheName.value
|
||||||
val module = ivyModule.value
|
val module = ivyModule.value
|
||||||
val updateConfig = updateConfiguration.value
|
val updateConfig = updateConfiguration.value
|
||||||
val ivyConfiguration0 = module.owner.configuration
|
val extraInputHash0 = module.extraInputHash
|
||||||
val moduleSettings0 = module.moduleSettings
|
val moduleSettings0 = module.moduleSettings
|
||||||
val inline0 = moduleSettings0 match { case x: InlineConfiguration => x }
|
val inline0 = moduleSettings0 match { case x: InlineConfiguration => x }
|
||||||
// Remove clock for caching purpose
|
// Remove clock for caching purpose
|
||||||
val updateConfig0 = updateConfig.withLogicalClock(LogicalClock.unknown)
|
val updateConfig0 = updateConfig.withLogicalClock(LogicalClock.unknown)
|
||||||
|
|
||||||
import sbt.librarymanagement.ivy.IvyConfiguration
|
import sbt.librarymanagement.{ ModuleSettings, UpdateConfiguration, LibraryManagementCodec }
|
||||||
import sbt.librarymanagement.{ ModuleSettings, UpdateConfiguration }
|
type In = (Long, ModuleSettings, UpdateConfiguration)
|
||||||
import sbt.internal.util.HListFormats._
|
|
||||||
|
|
||||||
type In = IvyConfiguration :+: ModuleSettings :+: UpdateConfiguration :+: HNil
|
import LibraryManagementCodec._
|
||||||
|
|
||||||
import sbt.util.CacheImplicits._
|
|
||||||
import sbt.internal.util.HListFormats._
|
|
||||||
import sbt.internal.AltLibraryManagementCodec._
|
|
||||||
|
|
||||||
val f: In => Unit =
|
val f: In => Unit =
|
||||||
Tracked.inputChanged(cacheStoreFactory make "inputs") { (inChanged: Boolean, in: In) =>
|
Tracked.inputChanged(cacheStoreFactory make "inputs") { (inChanged: Boolean, in: In) =>
|
||||||
val ivyConfiguration1 = in.head
|
val extraInputHash1 = in._1
|
||||||
val moduleSettings1 = in.tail.head
|
val moduleSettings1 = in._2
|
||||||
val inline1 = moduleSettings1 match { case x: InlineConfiguration => x }
|
val inline1 = moduleSettings1 match { case x: InlineConfiguration => x }
|
||||||
val updateConfig1 = in.tail.tail.head
|
val updateConfig1 = in._3
|
||||||
|
|
||||||
if (inChanged) {
|
if (inChanged) {
|
||||||
sys.error(s"""
|
sys.error(s"""
|
||||||
ivyConfiguration1 == ivyConfiguration0: ${ivyConfiguration1 == ivyConfiguration0}
|
extraInputHash1 == extraInputHash0: ${extraInputHash1 == extraInputHash0}
|
||||||
|
|
||||||
ivyConfiguration1:
|
extraInputHash1:
|
||||||
$ivyConfiguration1
|
$extraInputHash1
|
||||||
|
|
||||||
ivyConfiguration0
|
extraInputHash0
|
||||||
$ivyConfiguration0
|
$extraInputHash0
|
||||||
-----
|
-----
|
||||||
inline1 == inline0: ${inline1 == inline0}
|
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
|
// https://github.com/sbt/sbt/issues/3226
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
val baseSbt = "1.0"
|
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("."))
|
lazy val root = (project in file("."))
|
||||||
.settings(
|
.settings(
|
||||||
sbtPlugin := true,
|
sbtPlugin := true,
|
||||||
|
|
@ -11,6 +15,12 @@ lazy val root = (project in file("."))
|
||||||
assert(sv == "2.12", s"Wrong e:scalaVersion: $sv")
|
assert(sv == "2.12", s"Wrong e:scalaVersion: $sv")
|
||||||
assert(scalaBinaryVersion.value == "2.12", s"Wrong Scala binary version: ${scalaBinaryVersion.value}")
|
assert(scalaBinaryVersion.value == "2.12", s"Wrong Scala binary version: ${scalaBinaryVersion.value}")
|
||||||
assert(crossV startsWith "1.0.", s"Wrong `sbtVersion in pluginCrossBuild`: $crossV")
|
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") := {
|
TaskKey[Unit]("check2") := {
|
||||||
|
|
@ -20,5 +30,13 @@ lazy val root = (project in file("."))
|
||||||
assert(sv == "2.10", s"Wrong e:scalaVersion: $sv")
|
assert(sv == "2.10", s"Wrong e:scalaVersion: $sv")
|
||||||
assert(scalaBinaryVersion.value == "2.10", s"Wrong Scala binary version: ${scalaBinaryVersion.value}")
|
assert(scalaBinaryVersion.value == "2.10", s"Wrong Scala binary version: ${scalaBinaryVersion.value}")
|
||||||
assert(crossV startsWith "0.13", s"Wrong `sbtVersion in pluginCrossBuild`: $crossV")
|
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"))
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import sbt.internal.util.complete.{ Parser, DefaultParsers }
|
||||||
import sbt.internal.inc.classpath.ClasspathUtilities
|
import sbt.internal.inc.classpath.ClasspathUtilities
|
||||||
import sbt.internal.inc.ModuleUtilities
|
import sbt.internal.inc.ModuleUtilities
|
||||||
import java.lang.reflect.Method
|
import java.lang.reflect.Method
|
||||||
import sbt.librarymanagement.CrossVersion.binarySbtVersion
|
import sbt.librarymanagement.CrossVersion.partialVersion
|
||||||
|
|
||||||
object ScriptedPlugin extends AutoPlugin {
|
object ScriptedPlugin extends AutoPlugin {
|
||||||
override def requires = plugins.JvmPlugin
|
override def requires = plugins.JvmPlugin
|
||||||
|
|
@ -36,20 +36,18 @@ object ScriptedPlugin extends AutoPlugin {
|
||||||
scriptedSbt := (sbtVersion in pluginCrossBuild).value,
|
scriptedSbt := (sbtVersion in pluginCrossBuild).value,
|
||||||
sbtLauncher := getJars(ScriptedLaunchConf).map(_.get.head).value,
|
sbtLauncher := getJars(ScriptedLaunchConf).map(_.get.head).value,
|
||||||
sbtTestDirectory := sourceDirectory.value / "sbt-test",
|
sbtTestDirectory := sourceDirectory.value / "sbt-test",
|
||||||
libraryDependencies ++= {
|
libraryDependencies ++= (partialVersion(scriptedSbt.value) match {
|
||||||
binarySbtVersion(scriptedSbt.value) match {
|
case Some((0, 13)) =>
|
||||||
case "0.13" =>
|
Seq(
|
||||||
Seq(
|
"org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % ScriptedConf,
|
||||||
"org.scala-sbt" % "scripted-sbt" % scriptedSbt.value % ScriptedConf.toString,
|
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf
|
||||||
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf.toString
|
)
|
||||||
)
|
case Some((1, _)) =>
|
||||||
case sv if sv startsWith "1.0." =>
|
Seq(
|
||||||
Seq(
|
"org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % ScriptedConf,
|
||||||
"org.scala-sbt" %% "scripted-sbt" % scriptedSbt.value % ScriptedConf.toString,
|
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf
|
||||||
"org.scala-sbt" % "sbt-launch" % scriptedSbt.value % ScriptedLaunchConf.toString
|
)
|
||||||
)
|
}),
|
||||||
}
|
|
||||||
},
|
|
||||||
scriptedBufferLog := true,
|
scriptedBufferLog := true,
|
||||||
scriptedClasspath := getJars(ScriptedConf).value,
|
scriptedClasspath := getJars(ScriptedConf).value,
|
||||||
scriptedTests := scriptedTestsTask.value,
|
scriptedTests := scriptedTestsTask.value,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue