diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..e056819b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: test +on: + push: + branches: + - main + pull_request: +jobs: + test: + strategy: + fail-fast: false + matrix: + java: [8, 11, 17] + scala: [2.11.12, 2.12.15, 2.13.6, 3.0.2] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: coursier/cache-action@v6 + - uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: ${{matrix.java}} + - name: Test + run: sbt ++${{matrix.scala}} test package diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..dc337111 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Release +on: + push: + tags: ["*"] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: 8 + - run: sbt versionCheck ci-release + env: + PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}} + PGP_SECRET: ${{secrets.PGP_SECRET}} + SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} + SONATYPE_USERNAME: ${{secrets.SONATYPE_USERNAME}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 22657c54..00000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -version: ~> 1.0 # needed for imports - -import: scala/scala-dev:travis/default.yml - -language: scala - -scala: - - 2.11.12 - - 2.12.11 - - 2.13.3 - - 3.0.0 - -env: - - ADOPTOPENJDK=8 - - ADOPTOPENJDK=11 - -install: - - git fetch --tags # get all tags for sbt-dynver - -script: ./build.sh - -notifications: - email: - - seth.tisue@lightbend.com - - andy@hicks.net diff --git a/build.sbt b/build.sbt index 6eb9e069..bdb87bb4 100644 --- a/build.sbt +++ b/build.sbt @@ -1,18 +1,16 @@ -lazy val scalaTestVersion = "3.2.9" +lazy val scalaTestVersion = "3.2.10" + +ThisBuild / crossScalaVersions := Seq("3.0.2", "2.13.6", "2.12.15", "2.11.12") +ThisBuild / scalaVersion := crossScalaVersions.value.head // We use .. like 99% of Scala libraries. // Versions are binary compatible within x.y.* but not within x.*.* ThisBuild / versionScheme := Some("pvp") ThisBuild / versionPolicyIntention := Compatibility.None // 3.0.0 -lazy val commonSettings = Seq( - scalacOptions ++= Seq("-deprecation", "-feature"), -) - lazy val swing = project.in(file(".")) .settings(ScalaModulePlugin.scalaModuleSettings) .settings(ScalaModulePlugin.scalaModuleOsgiSettings) - .settings(commonSettings) .settings( name := "scala-swing", scalaModuleAutomaticModuleName := Some("scala.swing"), @@ -34,25 +32,18 @@ lazy val swing = project.in(file(".")) case _ => sourceDir / "scala-2.13-" } }, - // sources in (Compile, doc) := { - // if (isDotty.value) Nil else (sources in (Compile, doc)).value // dottydoc is currently broken - // }, ) lazy val examples = project.in(file("examples")) .dependsOn(swing) - .settings(commonSettings) .settings( - scalaVersion := (swing / scalaVersion).value, run / fork := true, fork := true, ) lazy val uitest = project.in(file("uitest")) .dependsOn(swing) - .settings(commonSettings) .settings( - scalaVersion := (swing / scalaVersion).value, run / fork := true, fork := true, ) diff --git a/project/build.properties b/project/build.properties index 19479ba4..10fd9eee 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.2 +sbt.version=1.5.5 diff --git a/project/plugins.sbt b/project/plugins.sbt index 49639f2e..417759f1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1 @@ -addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.3.0") -addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.1") +addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.0") diff --git a/src/main/scala/scala/swing/InternalFrame.scala b/src/main/scala/scala/swing/InternalFrame.scala index d8d0eb36..0a6ef263 100644 --- a/src/main/scala/scala/swing/InternalFrame.scala +++ b/src/main/scala/scala/swing/InternalFrame.scala @@ -2,7 +2,6 @@ package scala.swing import javax.swing.{Icon, JInternalFrame, WindowConstants} -import scala.swing.MenuBar.NoMenuBar import scala.swing.event.{InternalFrameActivated, InternalFrameClosed, InternalFrameClosing, InternalFrameDeactivated, InternalFrameDeiconified, InternalFrameIconified, InternalFrameOpened}