Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ language: scala

scala:
- 2.11.12
- 2.12.10
- 2.13.1
- 2.12.11
- 2.13.3

env:
- ADOPTOPENJDK=8
Expand All @@ -20,6 +20,5 @@ script: ./build.sh

notifications:
email:
- adriaan.moors@lightbend.com
- seth.tisue@lightbend.com
- andy@hicks.net
19 changes: 11 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ lazy val swing = project.in(file("."))
OsgiKeys.exportPackage := Seq(s"scala.swing.*;version=${version.value}"),
scalaModuleMimaPreviousVersion := Some("2.1.0"),
// set the prompt (for this build) to include the project id.
shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " },
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" % Test,
ThisBuild / shellPrompt := { state => Project.extract(state).currentRef.project + "> " },
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest-flatspec" % "3.2.0" % Test,
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.0" % Test,
),
// Adds a `src/main/scala-2.13+` source directory for Scala 2.13 and newer
// and a `src/main/scala-2.13-` source directory for Scala version older than 2.13
unmanagedSourceDirectories in Compile += {
val sourceDir = (sourceDirectory in Compile).value
Compile / unmanagedSourceDirectories += {
val sourceDir = (Compile / sourceDirectory).value
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n >= 13 => sourceDir / "scala-2.13+"
case _ => sourceDir / "scala-2.13-"
Expand All @@ -22,15 +25,15 @@ lazy val swing = project.in(file("."))
lazy val examples = project.in(file("examples"))
.dependsOn(swing)
.settings(
scalaVersion := (scalaVersion in swing).value,
fork in run := true,
scalaVersion := (swing / scalaVersion).value,
run / fork := true,
fork := true
)

lazy val uitest = project.in(file("uitest"))
.dependsOn(swing)
.settings(
scalaVersion := (scalaVersion in swing).value,
fork in run := true,
scalaVersion := (swing / scalaVersion).value,
run / fork := true,
fork := true
)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.7
sbt.version=1.3.13
5 changes: 3 additions & 2 deletions src/test/scala/scala/swing/Issue73.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package scala.swing

import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class Issue73 extends FlatSpec with Matchers {
class Issue73 extends AnyFlatSpec with Matchers {
"Enumerations" should "not contain duplicate ids" in {
// the initializers of any of these will through an
// assertion error if an enumeration `Value` id is used twice.
Expand Down
5 changes: 3 additions & 2 deletions src/test/scala/scala/swing/Issue97.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package scala.swing

import java.util.concurrent.TimeUnit

import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

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

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

def countEvents(): Future[Count] = {
Expand Down