diff options
Diffstat (limited to 'build.sbt')
-rw-r--r-- | build.sbt | 76 |
1 files changed, 12 insertions, 64 deletions
@@ -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")) @@ -114,7 +110,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[_]]( @@ -133,7 +129,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 @@ -303,6 +299,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" @@ -318,22 +315,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: _*) @@ -504,26 +495,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: _*) @@ -570,7 +541,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: _*) @@ -617,7 +588,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>, @@ -661,7 +632,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>, @@ -681,8 +652,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 @@ -691,12 +662,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 @@ -708,7 +679,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) @@ -744,29 +715,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") |