diff --git a/project/Build.scala b/project/Build.scala index 998904b480..209242ecac 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -27,6 +27,7 @@ object Util extends Build { version := libVersion, organization := "com.twitter", scalaVersion := "2.11.8", + crossScalaVersions := Seq("2.11.8", "2.12.0-M4"), // Workaround for a scaladoc bug which causes it to choke on empty classpaths. unmanagedClasspath in Compile += Attributed.blank(new java.io.File("doesnotexist")), libraryDependencies ++= Seq( @@ -49,6 +50,22 @@ object Util extends Build { "-Xlint:-missing-interpolator" ), + // scoverage automatically brings in libraries on our behalf, but it hasn't + // been updated for 2.12 yet[0]. for now, we need to rely on the 2.11 ones + // (which seem to work OK) + // + // [0]: https://github.com/scoverage/sbt-scoverage/issues/126 + libraryDependencies := { + libraryDependencies.value.map { + case moduleId: ModuleID + if moduleId.organization == "org.scoverage" + && scalaVersion.value.startsWith("2.12") => + moduleId.copy(name = moduleId.name.replace(scalaVersion.value, "2.11")) + case moduleId => + moduleId + } + }, + // Note: Use -Xlint rather than -Xlint:unchecked when TestThriftStructure // warnings are resolved javacOptions ++= Seq("-Xlint:unchecked", "-source", "1.8", "-target", "1.8"),