From 1f5c34a646eb21248b94766f4d85458c3cd42fd2 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Sat, 8 Apr 2017 18:17:18 -0400 Subject: Fix scala sxr for 2.12.1. Also remove it from Library, where it is more of a liability than actually helpful. --- internal/plugins/library/Library.scala | 2 +- ports/scala-xray/build/build.scala | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/internal/plugins/library/Library.scala b/internal/plugins/library/Library.scala index 8fea11a..382d1fb 100644 --- a/internal/plugins/library/Library.scala +++ b/internal/plugins/library/Library.scala @@ -3,7 +3,7 @@ import cbt._ import java.io._ import scala.concurrent._ import scala.concurrent.duration._ -trait Library extends Scalariform with GoogleJavaFormat with DynamicOverrides with AdvancedScala with ScalaXRay{ +trait Library extends Scalariform with GoogleJavaFormat with DynamicOverrides with AdvancedScala { def inceptionYear: Int def description: String def version = ??? diff --git a/ports/scala-xray/build/build.scala b/ports/scala-xray/build/build.scala index 91baa17..c6c200b 100644 --- a/ports/scala-xray/build/build.scala +++ b/ports/scala-xray/build/build.scala @@ -2,27 +2,27 @@ package cbt_ports.sxr import cbt._ import java.net._ import java.io._ -class Build(val context: Context) extends PackageJars with AdvancedScala{ outer => +class Build(val context: Context) extends PackageJars with AdvancedScala with CommandLineOverrides{ outer => override def defaultScalaVersion = "2.11.8" def groupId = "org.scala-sbt" - private def gitHash = - if( scalaVersion.startsWith("2.12") ) "6484c9e90fae956044653e4dd764d8fdd15ccf99" - else if( scalaVersion.startsWith("2.11") ) "cb66c7aaad618dc072d75f5899d9fdf3e8fde8d8" - else if( scalaVersion.startsWith("2.10") ) "1239fa39b5ee8c171af3f9df201497561d749826" - else throw new Exception( "Unsupported scalaVersion: " + scalaVersion ) + private def gitHash = scalaVersion match { + case "2.12.0" => "6484c9e90fae956044653e4dd764d8fdd15ccf99" + case v if v.startsWith( "2.12" ) => "67261cdbcc27a1e044d7b280b2db0a02ba27add5" + case v if v.startsWith( "2.11" ) => "cb66c7aaad618dc072d75f5899d9fdf3e8fde8d8" + case v if v.startsWith( "2.10" ) => "1239fa39b5ee8c171af3f9df201497561d749826" + case v => throw new Exception( "Unsupported scalaVersion: " + v ) + } - private def gitUrl = - if( scalaVersion.startsWith("2.12") ) "https://github.com/SethTisue/browse.git" - else if( scalaVersion.startsWith("2.11") ) "https://github.com/SethTisue/browse.git" - else if( scalaVersion.startsWith("2.10") ) "https://github.com/sbt/browse.git" - else throw new Exception( "Unsupported scalaVersion: " + scalaVersion ) + private def gitUrl = "https://github.com/cvogt/browse.git" def version = "rev-"+gitHash override def dependencies = Seq( libraries.scala.compiler ) - val github = GitDependency.checkout( gitUrl, gitHash ) - override def sources = Seq( github / "src" / "main" / "scala" ) + lazy val github = GitDependency.checkout( gitUrl, gitHash ) + override def sources = Seq( + github / "src" / "main" / "scala" + ) override def resourceClasspath = { val jquery_version = "1.3.2" -- cgit v1.2.3