File tree 2 files changed +17
-6
lines changed
2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change
1
+ import VersionKeys .{snapshotScalaBinaryVersion ,deriveBinaryVersion }
2
+
1
3
organization := " org.scala-lang.modules"
2
4
3
5
name := " scala-xml"
4
6
5
7
version := " 1.0.0-SNAPSHOT"
6
8
7
- // standard stuff follows:
8
9
scalaVersion := " 2.11.0-M7"
9
10
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
+
10
17
// to allow compiling against snapshot versions of Scala
11
18
resolvers += Resolver .sonatypeRepo(" snapshots" )
12
19
20
+
13
21
libraryDependencies ++= Seq (
14
22
" org.scala-lang" % " scala-compiler" % scalaVersion.value % " test" , // used in CompilerErrors test
15
23
" junit" % " junit" % " 4.11" % " test" ,
Original file line number Diff line number Diff line change 1
- object TestKeys {
1
+ object VersionKeys {
2
2
import sbt .settingKey
3
3
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." )
6
5
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