summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt76
1 files changed, 12 insertions, 64 deletions
diff --git a/build.sbt b/build.sbt
index b36f54ba99..4600f46840 100644
--- a/build.sbt
+++ b/build.sbt
@@ -60,10 +60,6 @@ val bootstrapScalaVersion = versionProps("starr.version")
def withoutScalaLang(moduleId: ModuleID): ModuleID = moduleId exclude("org.scala-lang", "*")
// exclusion of the scala-library transitive dependency avoids eviction warnings during `update`.
-val actorsMigrationDep = withoutScalaLang("org.scala-lang" %% "scala-actors-migration" % versionNumber("actors-migration"))
-val akkaActorDep = withoutScalaLang("com.typesafe.akka" %% "akka-actor" % versionNumber("akka-actor"))
-val scalaContinuationsLibraryDep = withoutScalaLang("org.scala-lang.plugins" %% "scala-continuations-library" % versionNumber("scala-continuations-library"))
-val scalaContinuationsPluginDep = withoutScalaLang("org.scala-lang.plugins" % ("scala-continuations-plugin_" + versionProps("scala.full.version")) % versionNumber("scala-continuations-plugin"))
val scalaParserCombinatorsDep = withoutScalaLang("org.scala-lang.modules" %% "scala-parser-combinators" % versionNumber("scala-parser-combinators"))
val scalaSwingDep = withoutScalaLang("org.scala-lang.modules" %% "scala-swing" % versionNumber("scala-swing"))
val scalaXmlDep = withoutScalaLang("org.scala-lang.modules" %% "scala-xml" % versionNumber("scala-xml"))
@@ -113,7 +109,7 @@ lazy val publishSettings : Seq[Setting[_]] = Seq(
// VersionUtil.versionPropertiesImpl for details. The standard sbt `version` setting should not be set directly. It
// is the same as the Maven version and derived automatically from `baseVersion` and `baseVersionSuffix`.
globalVersionSettings
-baseVersion in Global := "2.11.8"
+baseVersion in Global := "2.12.0"
baseVersionSuffix in Global := "SNAPSHOT"
lazy val commonSettings = clearSourceAndResourceDirectories ++ publishSettings ++ Seq[Setting[_]](
@@ -132,7 +128,7 @@ lazy val commonSettings = clearSourceAndResourceDirectories ++ publishSettings +
// we always assume that Java classes are standalone and do not have any dependency
// on Scala classes
compileOrder := CompileOrder.JavaThenScala,
- javacOptions in Compile ++= Seq("-g", "-source", "1.5", "-target", "1.6"),
+ javacOptions in Compile ++= Seq("-g", "-source", "1.8", "-target", "1.8"),
// we don't want any unmanaged jars; as a reminder: unmanaged jar is a jar stored
// directly on the file system and it's not resolved through Ivy
// Ant's build stored unmanaged jars in `lib/` directory
@@ -302,6 +298,7 @@ lazy val library = configureAsSubproject(project)
.settings(
name := "scala-library",
description := "Scala Standard Library",
+ compileOrder := CompileOrder.Mixed, // needed for JFunction classes in scala.runtime.java8
scalacOptions in Compile ++= Seq[String]("-sourcepath", (scalaSource in Compile).value.toString),
scalacOptions in Compile in doc ++= {
val libraryAuxDir = (baseDirectory in ThisBuild).value / "src/library-aux"
@@ -317,22 +314,16 @@ lazy val library = configureAsSubproject(project)
val base = (unmanagedResourceDirectories in Compile).value
base ** "*.txt" pair relativeTo(base)
},
- // Include forkjoin classes in scala-library.jar
- products in Compile in packageBin ++=
- (products in Compile in packageBin in forkjoin).value,
Osgi.headers += "Import-Package" -> "sun.misc;resolution:=optional, *",
fixPom(
"/project/name" -> <name>Scala Library</name>,
"/project/description" -> <description>Standard library for the Scala Programming Language</description>,
"/project/packaging" -> <packaging>jar</packaging>
- ),
- // Remove the dependency on "forkjoin" from the POM because it is included in the JAR:
- removePomDependencies(("org.scala-lang", "forkjoin"))
+ )
)
.settings(filterDocSources("*.scala" -- (regexFileFilter(".*/runtime/.*\\$\\.scala") ||
regexFileFilter(".*/runtime/ScalaRunTime\\.scala") ||
regexFileFilter(".*/runtime/StringAdd\\.scala"))): _*)
- .dependsOn(forkjoin)
lazy val reflect = configureAsSubproject(project)
.settings(generatePropertiesFileSettings: _*)
@@ -503,26 +494,6 @@ lazy val scalap = configureAsSubproject(project)
)
.dependsOn(compiler)
-// deprecated Scala Actors project
-lazy val actors = configureAsSubproject(project)
- .settings(generatePropertiesFileSettings: _*)
- .settings(Osgi.settings: _*)
- .settings(
- name := "scala-actors",
- description := "Scala Actors Library",
- Osgi.bundleName := "Scala Actors",
- startYear := Some(2006),
- fixPom(
- "/project/name" -> <name>Scala Actors library</name>,
- "/project/description" -> <description>Deprecated Actors Library for Scala</description>,
- "/project/packaging" -> <packaging>jar</packaging>
- )
- )
- .settings(filterDocSources("*.scala"): _*)
- .dependsOn(library)
-
-lazy val forkjoin = configureAsForkOfJavaProject(project)
-
lazy val partestExtras = configureAsSubproject(Project("partest-extras", file(".") / "src" / "partest-extras"))
.dependsOn(replJlineEmbedded)
.settings(clearSourceAndResourceDirectories: _*)
@@ -569,7 +540,7 @@ lazy val partestJavaAgent = Project("partest-javaagent", file(".") / "src" / "pa
)
lazy val test = project
- .dependsOn(compiler, interactive, actors, replJlineEmbedded, scalap, partestExtras, partestJavaAgent, scaladoc)
+ .dependsOn(compiler, interactive, replJlineEmbedded, scalap, partestExtras, partestJavaAgent, scaladoc)
.configs(IntegrationTest)
.settings(commonSettings: _*)
.settings(disableDocs: _*)
@@ -616,7 +587,7 @@ lazy val libraryAll = Project("library-all", file(".") / "target" / "library-all
name := "scala-library-all",
publishArtifact in (Compile, packageBin) := false,
publishArtifact in (Compile, packageSrc) := false,
- libraryDependencies ++= Seq(scalaXmlDep, scalaParserCombinatorsDep, scalaContinuationsLibraryDep, scalaSwingDep, akkaActorDep, actorsMigrationDep),
+ libraryDependencies ++= Seq(scalaXmlDep, scalaParserCombinatorsDep, scalaSwingDep),
apiURL := None,
fixPom(
"/project/name" -> <name>Scala Library Powerpack</name>,
@@ -660,7 +631,7 @@ lazy val scalaDist = Project("scala-dist", file(".") / "target" / "scala-dist-di
(htmlOut ** "*.html").get ++ (fixedManOut ** "*.1").get
}.taskValue,
managedResourceDirectories in Compile := Seq((resourceManaged in Compile).value),
- libraryDependencies ++= Seq(scalaContinuationsPluginDep, jlineDep),
+ libraryDependencies += jlineDep,
apiURL := None,
fixPom(
"/project/name" -> <name>Scala Distribution Artifacts</name>,
@@ -680,8 +651,8 @@ lazy val root = (project in file("."))
publishLocal := {},
commands ++= ScriptCommands.all
)
- .aggregate(library, forkjoin, reflect, compiler, interactive, repl, replJline, replJlineEmbedded,
- scaladoc, scalap, actors, partestExtras, junit, libraryAll, scalaDist).settings(
+ .aggregate(library, reflect, compiler, interactive, repl, replJline, replJlineEmbedded,
+ scaladoc, scalap, partestExtras, junit, libraryAll, scalaDist).settings(
sources in Compile := Seq.empty,
onLoadMessage := """|*** Welcome to the sbt build definition for Scala! ***
|This build definition has an EXPERIMENTAL status. If you are not
@@ -690,12 +661,12 @@ lazy val root = (project in file("."))
)
// The following subprojects' binaries are required for building "pack":
-lazy val distDependencies = Seq(replJline, replJlineEmbedded, compiler, library, partestExtras, partestJavaAgent, reflect, scalap, actors, scaladoc)
+lazy val distDependencies = Seq(replJline, replJlineEmbedded, compiler, library, partestExtras, partestJavaAgent, reflect, scalap, scaladoc)
lazy val dist = (project in file("dist"))
.settings(commonSettings)
.settings(
- libraryDependencies ++= Seq(scalaContinuationsLibraryDep, scalaContinuationsPluginDep, scalaSwingDep, jlineDep),
+ libraryDependencies ++= Seq(scalaSwingDep, jlineDep),
mkBin := mkBinImpl.value,
mkQuick <<= Def.task {
val cp = (fullClasspath in IntegrationTest in LocalProject("test")).value
@@ -707,7 +678,7 @@ lazy val dist = (project in file("dist"))
mkPack <<= Def.task {} dependsOn (packagedArtifact in (Compile, packageBin), mkBin),
target := (baseDirectory in ThisBuild).value / "target" / thisProject.value.id,
packageBin in Compile := {
- val extraDeps = Set(scalaContinuationsLibraryDep, scalaContinuationsPluginDep, scalaSwingDep, scalaParserCombinatorsDep, scalaXmlDep)
+ val extraDeps = Set(scalaSwingDep, scalaParserCombinatorsDep, scalaXmlDep)
val targetDir = (buildDirectory in ThisBuild).value / "pack" / "lib"
def uniqueModule(m: ModuleID) = (m.organization, m.name.replaceFirst("_.*", ""))
val extraModules = extraDeps.map(uniqueModule)
@@ -743,29 +714,6 @@ def configureAsSubproject(project: Project): Project = {
.settings(generatePropertiesFileSettings: _*)
}
-/**
- * Configuration for subprojects that are forks of some Java projects
- * we depend on. At the moment there's just forkjoin.
- *
- * We do not publish artifacts for those projects but we package their
- * binaries in a jar of other project (compiler or library).
- *
- * For that reason we disable docs generation, packaging and publishing.
- */
-def configureAsForkOfJavaProject(project: Project): Project = {
- val base = file(".") / "src" / project.id
- (project in base)
- .settings(commonSettings: _*)
- .settings(disableDocs: _*)
- .settings(
- publishArtifact := false,
- sourceDirectory in Compile := baseDirectory.value,
- javaSource in Compile := (sourceDirectory in Compile).value,
- sources in Compile in doc := Seq.empty,
- classDirectory in Compile := buildDirectory.value / "libs/classes" / thisProject.value.id
- )
-}
-
lazy val buildDirectory = settingKey[File]("The directory where all build products go. By default ./build")
lazy val mkBin = taskKey[Seq[File]]("Generate shell script (bash or Windows batch).")
lazy val mkQuick = taskKey[Unit]("Generate a full build, including scripts, in build-sbt/quick")