diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-03-10 11:35:51 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2015-04-17 11:47:26 -0700 |
commit | 54b7daccec0ce72b6077ebad137810cb4d864ae0 (patch) | |
tree | 7869ba208be1a76ea65286d3b4b644ed7ee6db0a /build.sbt | |
parent | ed93fac8b23b7b999ad88327beed8b2b2514d457 (diff) | |
download | scala-54b7daccec0ce72b6077ebad137810cb4d864ae0.tar.gz scala-54b7daccec0ce72b6077ebad137810cb4d864ae0.tar.bz2 scala-54b7daccec0ce72b6077ebad137810cb4d864ae0.zip |
Exclude transitive scala-library dependency
Scaladoc depends on scala-xml, etc, built with the previous stable
version of Scala. This isn't ideal, but we're stuck with this for
now.
We were relying on Ivy to evict the transitive dependency on the
old version of scala-library. However, SBT treats evictions of
scala-library as suspicious and emits a custom warning.
This commit explicitly excludes the transitive dependency so
as to avoid these warnings. It also makes the output of `show update`
a little easier to read.
Diffstat (limited to 'build.sbt')
-rw-r--r-- | build.sbt | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -11,13 +11,13 @@ * layout. For that reason we have to configure a lot more explicitly. I've tried explain in * comments the less obvious settings. * - * This nicely leads me to explaning goal and non-goals of this build definition. Goals are: + * This nicely leads me to explaining goal and non-goals of this build definition. Goals are: * * - to be easy to tweak it in case a bug or small inconsistency is found * - to mimic Ant's behavior as closely as possible * - to be super explicit about any departure from standard sbt settings * - to achieve functional parity with Ant build as quickly as possible - * - to be readable and not necessarily succint + * - to be readable and not necessarily succinct * - to provide the nicest development experience for people hacking on Scala * * Non-goals are: @@ -29,7 +29,7 @@ * * It boils down to simple rules: * - * - project laytout is set in stone for now + * - project layout is set in stone for now * - if you need to work on convincing sbt to follow non-standard layout then * explain everything you did in comments * - constantly check where Ant build produces class files, artifacts, what kind of other @@ -50,10 +50,12 @@ * https://groups.google.com/d/topic/scala-internals/gp5JsM1E0Fo/discussion */ +val bootstrapScalaVersion = "2.11.5" + lazy val commonSettings = Seq[Setting[_]]( organization := "org.scala-lang", version := "2.11.6-SNAPSHOT", - scalaVersion := "2.11.5", + scalaVersion := bootstrapScalaVersion, // we don't cross build Scala itself crossPaths := false, // do not add Scala library jar as a dependency automatically @@ -155,13 +157,13 @@ lazy val repl = configureAsSubproject(project). settings(disableDocsAndPublishingTasks: _*). dependsOn(compiler) +def moduleDependency(name: String) = + // exclusion of the scala-library transitive dependency avoids eviction warnings during `update`. + "org.scala-lang.modules" %% name % "1.0.3" exclude("org.scala-lang", "scala-library") + lazy val scaladoc = configureAsSubproject(project). settings( - libraryDependencies ++= Seq( - "org.scala-lang.modules" %% "scala-xml" % "1.0.3", - "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3", - "org.scala-lang.modules" %% "scala-partest" % "1.0.5" - ) + libraryDependencies ++= Seq("scala-xml", "scala-parser-combinators", "scala-partest").map(moduleDependency) ). settings(disableDocsAndPublishingTasks: _*). dependsOn(compiler) @@ -180,12 +182,10 @@ lazy val asm = configureAsForkOfJavaProject(project) lazy val root = (project in file(".")). aggregate(library, forkjoin, reflect, compiler, asm, interactive, repl, - scaladoc, scalap, actors). - // make the root project an aggragate-only - // we disable sbt's built-in Ivy plugin in the root project - // so it doesn't produce any artifact including not building - // an empty jar - disablePlugins(plugins.IvyPlugin) + scaladoc, scalap, actors).settings( + scalaVersion := bootstrapScalaVersion, + ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) } + ) /** * Configures passed project as a subproject (e.g. compiler or repl) |