Skip to content

Commit 13ae8d8

Browse files
authored
Merge pull request #121 from SethTisue/version-bumps
newer Scala, sbt, ScalaTest
2 parents 192ff1c + 0c0edb6 commit 13ae8d8

File tree

5 files changed

+20
-16
lines changed

5 files changed

+20
-16
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ language: scala
66

77
scala:
88
- 2.11.12
9-
- 2.12.10
10-
- 2.13.1
9+
- 2.12.11
10+
- 2.13.3
1111

1212
env:
1313
- ADOPTOPENJDK=8
@@ -20,6 +20,5 @@ script: ./build.sh
2020

2121
notifications:
2222
email:
23-
2423
2524

build.sbt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ lazy val swing = project.in(file("."))
66
OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}"),
77
scalaModuleMimaPreviousVersion := Some("2.1.0"),
88
// set the prompt (for this build) to include the project id.
9-
shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " },
10-
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" % Test,
9+
ThisBuild / shellPrompt := { state => Project.extract(state).currentRef.project + "> " },
10+
libraryDependencies ++= Seq(
11+
"org.scalatest" %% "scalatest-flatspec" % "3.2.0" % Test,
12+
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.0" % Test,
13+
),
1114
// Adds a `src/main/scala-2.13+` source directory for Scala 2.13 and newer
1215
// and a `src/main/scala-2.13-` source directory for Scala version older than 2.13
13-
unmanagedSourceDirectories in Compile += {
14-
val sourceDir = (sourceDirectory in Compile).value
16+
Compile / unmanagedSourceDirectories += {
17+
val sourceDir = (Compile / sourceDirectory).value
1518
CrossVersion.partialVersion(scalaVersion.value) match {
1619
case Some((2, n)) if n >= 13 => sourceDir / "scala-2.13+"
1720
case _ => sourceDir / "scala-2.13-"
@@ -22,15 +25,15 @@ lazy val swing = project.in(file("."))
2225
lazy val examples = project.in(file("examples"))
2326
.dependsOn(swing)
2427
.settings(
25-
scalaVersion := (scalaVersion in swing).value,
26-
fork in run := true,
28+
scalaVersion := (swing / scalaVersion).value,
29+
run / fork := true,
2730
fork := true
2831
)
2932

3033
lazy val uitest = project.in(file("uitest"))
3134
.dependsOn(swing)
3235
.settings(
33-
scalaVersion := (scalaVersion in swing).value,
34-
fork in run := true,
36+
scalaVersion := (swing / scalaVersion).value,
37+
run / fork := true,
3538
fork := true
3639
)

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.3.7
1+
sbt.version=1.3.13

src/test/scala/scala/swing/Issue73.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package scala.swing
22

3-
import org.scalatest.{FlatSpec, Matchers}
3+
import org.scalatest.flatspec.AnyFlatSpec
4+
import org.scalatest.matchers.should.Matchers
45

5-
class Issue73 extends FlatSpec with Matchers {
6+
class Issue73 extends AnyFlatSpec with Matchers {
67
"Enumerations" should "not contain duplicate ids" in {
78
// the initializers of any of these will through an
89
// assertion error if an enumeration `Value` id is used twice.

src/test/scala/scala/swing/Issue97.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ package scala.swing
22

33
import java.util.concurrent.TimeUnit
44

5-
import org.scalatest.{FlatSpec, Matchers}
5+
import org.scalatest.flatspec.AnyFlatSpec
6+
import org.scalatest.matchers.should.Matchers
67

78
import scala.concurrent.duration.Duration
89
import scala.concurrent.{Await, Future, Promise}
910
import scala.swing.event.{UIElementHidden, UIElementMoved, UIElementResized, UIElementShown}
1011
import scala.util.control.NonFatal
1112

1213
// Note: `AsyncFlatSpec` has issues with swallowing errors and returning early.
13-
class Issue97 extends FlatSpec with Matchers {
14+
class Issue97 extends AnyFlatSpec with Matchers {
1415
case class Count(shown: Int = 0, hidden: Int = 0, moved: Int = 0, resized: Int = 0)
1516

1617
def countEvents(): Future[Count] = {

0 commit comments

Comments
 (0)