File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 1+ import VersionKeys .{snapshotScalaBinaryVersion ,deriveBinaryVersion }
2+
13organization := " org.scala-lang.modules"
24
35name := " scala-parser-combinators"
@@ -6,9 +8,16 @@ version := "1.0.0-SNAPSHOT"
68
79scalaVersion := " 2.11.0-M7"
810
11+ snapshotScalaBinaryVersion := " 2.11.0-M7"
12+
13+ // DOUBLETHINK YOUR WAY OUT OF EDITING BELOW (THERE IS NO BELOW)
14+
15+ scalaBinaryVersion := deriveBinaryVersion(scalaVersion.value, snapshotScalaBinaryVersion.value)
16+
917// to allow compiling against snapshot versions of Scala
1018resolvers += Resolver .sonatypeRepo(" snapshots" )
1119
20+
1221libraryDependencies ++= Seq (
1322 " junit" % " junit" % " 4.11" % " test" ,
1423 " com.novocode" % " junit-interface" % " 0.10" % " test" )
Original file line number Diff line number Diff line change 1- object TestKeys {
1+ object VersionKeys {
22 import sbt .settingKey
33
4- // for testing with partest
5- val includeTestDependencies = settingKey[Boolean ](" Doesn't declare test dependencies." )
4+ val snapshotScalaBinaryVersion = settingKey[String ](" The Scala binary version to use when building against Scala SNAPSHOT." )
65
7- val partestVersion = settingKey[String ](" Partest version." )
8- }
6+ def deriveBinaryVersion (sv : String , snapshotScalaBinaryVersion : String ) = sv match {
7+ case snap_211 if snap_211.startsWith(" 2.11" ) &&
8+ snap_211.contains(" -SNAPSHOT" ) => snapshotScalaBinaryVersion
9+ case sv => sbt.CrossVersion .binaryScalaVersion(sv)
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments