Skip to content

Commit 22bb87a

Browse files
authored
Merge pull request #22 from Toromtomtom/scala-2.13.0
Port to SBT 1.2.8, sbt-scala-module, and Scala 2.13.0
2 parents 835c42b + 1ad6bb7 commit 22bb87a

File tree

5 files changed

+20
-26
lines changed

5 files changed

+20
-26
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
language: scala
22

33
jdk:
4-
- oraclejdk8
4+
- openjdk8
55
- openjdk11
66

77
scala:
8-
- 2.13.0-RC1
8+
- 2.13.0
99

1010
script:
1111
- sbt ++$TRAVIS_SCALA_VERSION test

build.sbt

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,38 @@
11
// TODO Make it a cross project including Scala.js
2+
import ScalaModulePlugin._
23

3-
scalaVersion := "2.13.0-RC1"
4+
scalaModuleSettings
45

5-
organization := "org.scala-lang"
6+
name := "scala-collection-contrib"
67

78
version := "0.1.0-SNAPSHOT"
89

9-
scalacOptions ++= Seq("-deprecation", "-feature", "-opt-warnings", "-unchecked", "-language:higherKinds")
10+
scalaVersionsByJvm in ThisBuild := {
11+
val v213 = "2.13.0"
12+
Map(
13+
8 -> List(v213 -> true),
14+
11 -> List(v213 -> false),
15+
12 -> List(v213 -> false))
16+
}
17+
18+
scalacOptions ++= Seq("-opt-warnings", "-language:higherKinds")
1019

1120
scalacOptions in (Compile, doc) ++= Seq("-implicits", "-groups")
1221

1322
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-v", "-s", "-a")
1423

15-
fork in Test := true
16-
1724
parallelExecution in Test := false
1825

1926
homepage := Some(url("https://github.com/scala/scala-collection-contrib"))
2027

2128
licenses := Seq("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0"))
2229

23-
scmInfo := Some(
24-
ScmInfo(
25-
url("https://github.com/scala/scala-collection-contrib"),
26-
"scm:git:[email protected]:scala/scala-collection-contrib.git"
27-
)
28-
)
29-
3030
pomExtra :=
3131
<developers>
3232
<developer><id>julienrf</id><name>Julien Richard-Foy</name></developer>
3333
<developer><id>szeiger</id><name>Stefan Zeiger</name></developer>
3434
</developers>
3535

36-
// For publishing snapshots
37-
credentials ++= (
38-
for {
39-
username <- sys.env.get("SONATYPE_USERNAME")
40-
password <- sys.env.get("SONATYPE_PASSWORD")
41-
} yield Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", username, password)
42-
).toList
43-
4436
libraryDependencies ++= Seq(
4537
"junit" % "junit" % "4.12",
4638
"com.novocode" % "junit-interface" % "0.11" % Test,

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.13.18
1+
sbt.version=1.2.8

project/plugins.sbt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
1+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.3")
22

33
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
44

5+
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.0.0")
6+

src/main/scala/scala/collection/decorators/MapDecorator.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class MapDecorator[C, M <: IsMap[C]](coll: C)(implicit val map: M) {
109109
def leftOuterJoin[W, That](other: Map[map.K, W])(implicit bf: BuildFrom[C, (map.K, (map.V, Option[W])), That]): That = {
110110
val b = bf.newBuilder(coll)
111111
for ((k, v) <- map(coll)) {
112-
b += k -> (v, other.get(k))
112+
b += k -> ((v, other.get(k)))
113113
}
114114
b.result()
115115
}
@@ -128,7 +128,7 @@ class MapDecorator[C, M <: IsMap[C]](coll: C)(implicit val map: M) {
128128
def rightOuterJoin[W, That](other: Map[map.K, W])(implicit bf: BuildFrom[C, (map.K, (Option[map.V], W)), That]): That = {
129129
val b = bf.newBuilder(coll)
130130
for ((k, w) <- other) {
131-
b += k -> (map(coll).get(k), w)
131+
b += k -> ((map(coll).get(k), w))
132132
}
133133
b.result()
134134
}

0 commit comments

Comments
 (0)