mirror of https://github.com/sbt/sbt.git
Fix build
This commit is contained in:
parent
f42419bdd4
commit
f65712e90d
59
build.sbt
59
build.sbt
|
|
@ -11,7 +11,7 @@ import Sxr.sxr
|
||||||
def commonSettings: Seq[Setting[_]] = Seq(
|
def commonSettings: Seq[Setting[_]] = Seq(
|
||||||
organization := "org.scala-sbt",
|
organization := "org.scala-sbt",
|
||||||
version := "0.13.8-SNAPSHOT",
|
version := "0.13.8-SNAPSHOT",
|
||||||
scalaVersion in ThisBuild := "2.10.4",
|
scalaVersion := "2.10.4",
|
||||||
publishArtifact in packageDoc := false,
|
publishArtifact in packageDoc := false,
|
||||||
publishMavenStyle := false,
|
publishMavenStyle := false,
|
||||||
componentID := None,
|
componentID := None,
|
||||||
|
|
@ -20,7 +20,8 @@ def commonSettings: Seq[Setting[_]] = Seq(
|
||||||
concurrentRestrictions in Global += Util.testExclusiveRestriction,
|
concurrentRestrictions in Global += Util.testExclusiveRestriction,
|
||||||
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
|
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
|
||||||
javacOptions in compile ++= Seq("-target", "6", "-source", "6", "-Xlint", "-Xlint:-serial"),
|
javacOptions in compile ++= Seq("-target", "6", "-source", "6", "-Xlint", "-Xlint:-serial"),
|
||||||
incOptions := incOptions.value.withNameHashing(true)
|
incOptions := incOptions.value.withNameHashing(true),
|
||||||
|
crossScalaVersions := Seq(scala210)
|
||||||
)
|
)
|
||||||
|
|
||||||
def minimalSettings: Seq[Setting[_]] =
|
def minimalSettings: Seq[Setting[_]] =
|
||||||
|
|
@ -84,7 +85,13 @@ lazy val interfaceProj = (project in file("interface")).
|
||||||
watchSources <++= apiDefinitions,
|
watchSources <++= apiDefinitions,
|
||||||
resourceGenerators in Compile <+= (version, resourceManaged, streams, compile in Compile) map generateVersionFile,
|
resourceGenerators in Compile <+= (version, resourceManaged, streams, compile in Compile) map generateVersionFile,
|
||||||
apiDefinitions <<= baseDirectory map { base => (base / "definition") :: (base / "other") :: (base / "type") :: Nil },
|
apiDefinitions <<= baseDirectory map { base => (base / "definition") :: (base / "other") :: (base / "type") :: Nil },
|
||||||
sourceGenerators in Compile <+= (cacheDirectory, apiDefinitions, fullClasspath in Compile in datatypeProj, sourceManaged in Compile, mainClass in datatypeProj in Compile, runner, streams) map generateAPICached
|
sourceGenerators in Compile <+= (cacheDirectory,
|
||||||
|
apiDefinitions,
|
||||||
|
fullClasspath in Compile in datatypeProj,
|
||||||
|
sourceManaged in Compile,
|
||||||
|
mainClass in datatypeProj in Compile,
|
||||||
|
runner,
|
||||||
|
streams) map generateAPICached
|
||||||
)
|
)
|
||||||
|
|
||||||
// defines operations on the API of a source, including determining whether it has changed and converting it to a string
|
// defines operations on the API of a source, including determining whether it has changed and converting it to a string
|
||||||
|
|
@ -101,15 +108,15 @@ lazy val apiProj = (project in compilePath / "api").
|
||||||
lazy val controlProj = (project in utilPath / "control").
|
lazy val controlProj = (project in utilPath / "control").
|
||||||
settings(baseSettings ++ Util.crossBuild: _*).
|
settings(baseSettings ++ Util.crossBuild: _*).
|
||||||
settings(
|
settings(
|
||||||
name := "Control",
|
name := "Control"
|
||||||
crossScalaVersions := Seq(scala210, scala211)
|
// crossScalaVersions := Seq(scala210, scala211)
|
||||||
)
|
)
|
||||||
|
|
||||||
lazy val collectionProj = (project in utilPath / "collection").
|
lazy val collectionProj = (project in utilPath / "collection").
|
||||||
settings(testedBaseSettings ++ Util.keywordsSettings ++ Util.crossBuild: _*).
|
settings(testedBaseSettings ++ Util.keywordsSettings ++ Util.crossBuild: _*).
|
||||||
settings(
|
settings(
|
||||||
name := "Collections",
|
name := "Collections"
|
||||||
crossScalaVersions := Seq(scala210, scala211)
|
// crossScalaVersions := Seq(scala210, scala211)
|
||||||
)
|
)
|
||||||
|
|
||||||
lazy val applyMacroProj = (project in utilPath / "appmacro").
|
lazy val applyMacroProj = (project in utilPath / "appmacro").
|
||||||
|
|
@ -135,8 +142,8 @@ lazy val ioProj = (project in utilPath / "io").
|
||||||
settings(testedBaseSettings ++ Util.crossBuild: _*).
|
settings(testedBaseSettings ++ Util.crossBuild: _*).
|
||||||
settings(
|
settings(
|
||||||
name := "IO",
|
name := "IO",
|
||||||
libraryDependencies += scalaCompiler.value % Test,
|
libraryDependencies += scalaCompiler.value % Test
|
||||||
crossScalaVersions := Seq(scala210, scala211)
|
// crossScalaVersions := Seq(scala210, scala211)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Utilities related to reflection, managing Scala versions, and custom class loaders
|
// Utilities related to reflection, managing Scala versions, and custom class loaders
|
||||||
|
|
@ -154,8 +161,8 @@ lazy val completeProj = (project in utilPath / "complete").
|
||||||
settings(testedBaseSettings ++ Util.crossBuild: _*).
|
settings(testedBaseSettings ++ Util.crossBuild: _*).
|
||||||
settings(
|
settings(
|
||||||
name := "Completion",
|
name := "Completion",
|
||||||
libraryDependencies += jline,
|
libraryDependencies += jline
|
||||||
crossScalaVersions := Seq(scala210, scala211)
|
// crossScalaVersions := Seq(scala210, scala211)
|
||||||
)
|
)
|
||||||
|
|
||||||
// logging
|
// logging
|
||||||
|
|
@ -295,9 +302,9 @@ lazy val compileInterfaceProj = (project in compilePath / "interface").
|
||||||
artifact in (Compile, packageSrc) := Artifact(srcID).copy(configurations = Compile :: Nil).extra("e:component" -> srcID)
|
artifact in (Compile, packageSrc) := Artifact(srcID).copy(configurations = Compile :: Nil).extra("e:component" -> srcID)
|
||||||
)
|
)
|
||||||
|
|
||||||
lazy val precompiled282 = precompiled("2.8.2")
|
lazy val precompiled282 = precompiled(scala282)
|
||||||
lazy val precompiled292 = precompiled("2.9.2")
|
lazy val precompiled292 = precompiled(scala292)
|
||||||
lazy val precompiled293 = precompiled("2.9.3")
|
lazy val precompiled293 = precompiled(scala293)
|
||||||
|
|
||||||
// Implements the core functionality of detecting and propagating changes incrementally.
|
// Implements the core functionality of detecting and propagating changes incrementally.
|
||||||
// Defines the data structures for representing file fingerprints and relationships and the overall source analysis
|
// Defines the data structures for representing file fingerprints and relationships and the overall source analysis
|
||||||
|
|
@ -447,6 +454,7 @@ def allProjects = Seq(launchInterfaceProj, launchProj, testSamples, interfacePro
|
||||||
compilerIntegrationProj, compilerIvyProj,
|
compilerIntegrationProj, compilerIvyProj,
|
||||||
scriptedBaseProj, scriptedSbtProj, scriptedPluginProj,
|
scriptedBaseProj, scriptedSbtProj, scriptedPluginProj,
|
||||||
actionsProj, commandProj, mainSettingsProj, mainProj, sbtProj, mavenResolverPluginProj)
|
actionsProj, commandProj, mainSettingsProj, mainProj, sbtProj, mavenResolverPluginProj)
|
||||||
|
|
||||||
def projectsWithMyProvided = allProjects.map(p => p.copy(configurations = (p.configurations.filter(_ != Provided)) :+ myProvided))
|
def projectsWithMyProvided = allProjects.map(p => p.copy(configurations = (p.configurations.filter(_ != Provided)) :+ myProvided))
|
||||||
lazy val nonRoots = projectsWithMyProvided.map(p => LocalProject(p.id))
|
lazy val nonRoots = projectsWithMyProvided.map(p => LocalProject(p.id))
|
||||||
|
|
||||||
|
|
@ -460,7 +468,7 @@ def otherRootSettings = Seq(
|
||||||
Scripted.scriptedUnpublished <<= scriptedUnpublishedTask,
|
Scripted.scriptedUnpublished <<= scriptedUnpublishedTask,
|
||||||
Scripted.scriptedSource <<= (sourceDirectory in sbtProj) / "sbt-test",
|
Scripted.scriptedSource <<= (sourceDirectory in sbtProj) / "sbt-test",
|
||||||
publishAll := {
|
publishAll := {
|
||||||
(publishLocal).all(ScopeFilter(inAnyProject)).value
|
val _ = (publishLocal).all(ScopeFilter(inAnyProject)).value
|
||||||
}
|
}
|
||||||
) ++ inConfig(Scripted.MavenResolverPluginTest)(Seq(
|
) ++ inConfig(Scripted.MavenResolverPluginTest)(Seq(
|
||||||
Scripted.scripted <<= scriptedTask,
|
Scripted.scripted <<= scriptedTask,
|
||||||
|
|
@ -535,6 +543,7 @@ def precompiled(scalav: String): Project = Project(id = normalize("Precompiled "
|
||||||
assert(sbtScalaV != scalav, "Precompiled compiler interface cannot have the same Scala version (" + scalav + ") as sbt.")
|
assert(sbtScalaV != scalav, "Precompiled compiler interface cannot have the same Scala version (" + scalav + ") as sbt.")
|
||||||
scalav
|
scalav
|
||||||
},
|
},
|
||||||
|
crossScalaVersions := Seq(scalav),
|
||||||
// we disable compiling and running tests in precompiled Projprojects of compiler interface
|
// we disable compiling and running tests in precompiled Projprojects of compiler interface
|
||||||
// so we do not need to worry about cross-versioning testing dependencies
|
// so we do not need to worry about cross-versioning testing dependencies
|
||||||
sources in Test := Nil
|
sources in Test := Nil
|
||||||
|
|
@ -567,7 +576,14 @@ def customCommands: Seq[Setting[_]] = Seq(
|
||||||
},
|
},
|
||||||
commands += Command.command("release-sbt-local") { state =>
|
commands += Command.command("release-sbt-local") { state =>
|
||||||
"clean" ::
|
"clean" ::
|
||||||
|
"interfaceProj/compile" :: // Java project needs to compile first
|
||||||
|
"precompiled-2_8_2/compile" ::
|
||||||
|
"precompiled-2_9_2/compile" ::
|
||||||
|
"precompiled-2_9_3/compile" ::
|
||||||
"so compile" ::
|
"so compile" ::
|
||||||
|
"precompiled-2_8_2/publishLocal" ::
|
||||||
|
"precompiled-2_9_2/publishLocal" ::
|
||||||
|
"precompiled-2_9_3/publishLocal" ::
|
||||||
"so publishLocal" ::
|
"so publishLocal" ::
|
||||||
"reload" ::
|
"reload" ::
|
||||||
state
|
state
|
||||||
|
|
@ -577,10 +593,21 @@ def customCommands: Seq[Setting[_]] = Seq(
|
||||||
"clean" ::
|
"clean" ::
|
||||||
"checkCredentials" ::
|
"checkCredentials" ::
|
||||||
"conscript-configs" ::
|
"conscript-configs" ::
|
||||||
|
"interfaceProj/compile" :: // Java project needs to compile first
|
||||||
|
"precompiled-2_8_2/compile" ::
|
||||||
|
"precompiled-2_9_2/compile" ::
|
||||||
|
"precompiled-2_9_3/compile" ::
|
||||||
"so compile" ::
|
"so compile" ::
|
||||||
"so publishSigned" ::
|
"so publishSigned" ::
|
||||||
|
"precompiled-2_8_2/publishSigned" ::
|
||||||
|
"precompiled-2_9_2/publishSigned" ::
|
||||||
|
"precompiled-2_9_3/publishSigned" ::
|
||||||
"publishLauncher" ::
|
"publishLauncher" ::
|
||||||
"release-libs-211" ::
|
"++2.11.1" ::
|
||||||
|
"controlProj/publishSigned" ::
|
||||||
|
"collectionProj/publishSigned" ::
|
||||||
|
"ioProj/publishSigned" ::
|
||||||
|
"completeProj/publishSigned" ::
|
||||||
state
|
state
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,9 @@ import sbt._
|
||||||
import Keys._
|
import Keys._
|
||||||
|
|
||||||
object Dependencies {
|
object Dependencies {
|
||||||
|
lazy val scala282 = "2.8.2"
|
||||||
|
lazy val scala292 = "2.9.2"
|
||||||
|
lazy val scala293 = "2.9.3"
|
||||||
lazy val scala210 = "2.10.4"
|
lazy val scala210 = "2.10.4"
|
||||||
lazy val scala211 = "2.11.1"
|
lazy val scala211 = "2.11.1"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ object NightlyPlugin extends AutoPlugin {
|
||||||
override def trigger = allRequirements
|
override def trigger = allRequirements
|
||||||
override def requires = plugins.JvmPlugin
|
override def requires = plugins.JvmPlugin
|
||||||
object autoImport {
|
object autoImport {
|
||||||
lazy val nightly212 = SettingKey[Boolean]("nightly212")
|
|
||||||
lazy val includeTestDependencies = SettingKey[Boolean]("includeTestDependencies", "Doesn't declare test dependencies.")
|
lazy val includeTestDependencies = SettingKey[Boolean]("includeTestDependencies", "Doesn't declare test dependencies.")
|
||||||
|
|
||||||
def testDependencies = libraryDependencies <++= includeTestDependencies { incl =>
|
def testDependencies = libraryDependencies <++= includeTestDependencies { incl =>
|
||||||
|
|
@ -22,8 +21,13 @@ object NightlyPlugin extends AutoPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
override def buildSettings: Seq[Setting[_]] = Seq(
|
override def buildSettings: Seq[Setting[_]] = Seq(
|
||||||
nightly212 <<= scalaVersion(v => v.startsWith("2.12.")),
|
// Avoid 2.12.x nightlies
|
||||||
includeTestDependencies <<= nightly212(x => !x)
|
// Avoid 2.9.x precompiled
|
||||||
|
// Avoid 2.8.x precompiled
|
||||||
|
includeTestDependencies := {
|
||||||
|
val v = scalaVersion.value
|
||||||
|
v.startsWith("2.10.") || v.startsWith("2.11.")
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
override def projectSettings: Seq[Setting[_]] = Seq(
|
override def projectSettings: Seq[Setting[_]] = Seq(
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ object Util {
|
||||||
lazy val baseScalacOptions = Seq(
|
lazy val baseScalacOptions = Seq(
|
||||||
scalacOptions ++= Seq("-Xelide-below", "0"),
|
scalacOptions ++= Seq("-Xelide-below", "0"),
|
||||||
scalacOptions <++= scalaVersion map CrossVersion.partialVersion map {
|
scalacOptions <++= scalaVersion map CrossVersion.partialVersion map {
|
||||||
case Some((2, 9)) => Nil // support 2.9 for some subprojects for the Scala Eclipse IDE
|
case Some((2, 9)) | Some((2, 8)) => Nil // support 2.9 for some subprojects for the Scala Eclipse IDE
|
||||||
case _ => Seq("-feature", "-language:implicitConversions", "-language:postfixOps", "-language:higherKinds", "-language:existentials")
|
case _ => Seq("-feature", "-language:implicitConversions", "-language:postfixOps", "-language:higherKinds", "-language:existentials")
|
||||||
},
|
},
|
||||||
scalacOptions <++= scalaVersion map CrossVersion.partialVersion map {
|
scalacOptions <++= scalaVersion map CrossVersion.partialVersion map {
|
||||||
case Some((2, 10)) => Seq("-deprecation", "-Xlint")
|
case Some((2, 10)) => Seq("-deprecation", "-Xlint")
|
||||||
|
|
|
||||||
|
|
@ -13,4 +13,4 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.3.0")
|
||||||
|
|
||||||
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
|
addSbtPlugin("com.typesafe.sbt" % "sbt-javaversioncheck" % "0.1.0")
|
||||||
|
|
||||||
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.1")
|
addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.2")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue