Skip to content

Commit 3c68c9b

Browse files
committed
Merge pull request #7 from retronym/topic/sbt-build-tweaks
Exclude transitive scala-library dependency
2 parents c14c5b0 + 0849761 commit 3c68c9b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

build.sbt

+12-12
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@
5050
* https://groups.google.com/d/topic/scala-internals/gp5JsM1E0Fo/discussion
5151
*/
5252

53+
val boostrapScalaVersion = "2.11.5"
54+
5355
lazy val commonSettings = Seq[Setting[_]](
5456
organization := "org.scala-lang",
5557
version := "2.11.6-SNAPSHOT",
56-
scalaVersion := "2.11.5",
58+
scalaVersion := boostrapScalaVersion,
5759
// we don't cross build Scala itself
5860
crossPaths := false,
5961
// do not add Scala library jar as a dependency automatically
@@ -170,13 +172,13 @@ lazy val repl = configureAsSubproject(project).
170172
settings(disableDocsAndPublishingTasks: _*).
171173
dependsOn(compiler)
172174

175+
def moduleDependency(name: String) =
176+
// exclusion of the scala-library transitive dependency avoids eviction warnings during `update`.
177+
"org.scala-lang.modules" %% name % "1.0.3" exclude("org.scala-lang", "scala-library")
178+
173179
lazy val scaladoc = configureAsSubproject(project).
174180
settings(
175-
libraryDependencies ++= Seq(
176-
"org.scala-lang.modules" %% "scala-xml" % "1.0.3",
177-
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.3",
178-
"org.scala-lang.modules" %% "scala-partest" % "1.0.5"
179-
)
181+
libraryDependencies ++= Seq("scala-xml", "scala-parser-combinators", "scala-partest").map(moduleDependency)
180182
).
181183
settings(disableDocsAndPublishingTasks: _*).
182184
dependsOn(compiler)
@@ -195,12 +197,10 @@ lazy val asm = configureAsForkOfJavaProject(project)
195197

196198
lazy val root = (project in file(".")).
197199
aggregate(library, forkjoin, reflect, compiler, asm, interactive, repl,
198-
scaladoc, scalap).
199-
// make the root project an aggragate-only
200-
// we disable sbt's built-in Ivy plugin in the root project
201-
// so it doesn't produce any artifact including not building
202-
// an empty jar
203-
disablePlugins(plugins.IvyPlugin)
200+
scaladoc, scalap).settings(
201+
scalaVersion := boostrapScalaVersion,
202+
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
203+
)
204204

205205
/**
206206
* Configures passed project as a subproject (e.g. compiler or repl)

0 commit comments

Comments
 (0)