From c5a402fb5793f6404e5a88ec3fc2e175e59a1fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=A0pan=C4=9Bl?= Date: Fri, 22 Mar 2024 12:48:15 +0100 Subject: [PATCH] Update sbt and compiler --- .github/workflows/deploy-gh-pages.yml | 4 ++-- .github/workflows/deploy-jar.yml | 2 +- build.sbt | 10 +++++----- .../com/github/opengrabeso/formulafx/FormulaFX.scala | 4 ++-- project/build.properties | 2 +- project/plugins.sbt | 6 +++--- .../github/opengrabeso/formulafx/ExprParserTest.scala | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index c91ef17..95b0d7c 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -24,8 +24,8 @@ jobs: git config --add github.token ${{ secrets.GITHUB_TOKEN }} sbt projsJS/fullOptJS mkdir public - cp js/target/scala-2.13/formulafx-opt.js public/. - cp js/target/scala-2.13/index.html public/. + cp js/target/scala-3.3.3/formulafx-opt.js public/. + cp js/target/scala-3.3.3/index.html public/. - name: Deploy if: success() uses: crazy-max/ghaction-github-pages@v1 diff --git a/.github/workflows/deploy-jar.yml b/.github/workflows/deploy-jar.yml index f627868..e8598eb 100644 --- a/.github/workflows/deploy-jar.yml +++ b/.github/workflows/deploy-jar.yml @@ -27,6 +27,6 @@ jobs: - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: - file: jvm/target/scala-2.13/FormulaFX.jar + file: jvm/target/scala-3.3.3/FormulaFX.jar tag: ${{ github.ref }} overwrite: true diff --git a/build.sbt b/build.sbt index d1c364d..423af9f 100644 --- a/build.sbt +++ b/build.sbt @@ -14,10 +14,10 @@ def generateIndexTask(index: String, suffix: String) = Def.task { } lazy val commonSettings = Seq( - scalaVersion := "2.13.10", + scalaVersion := "3.3.3", version := "0.3.0", - libraryDependencies += "org.scala-lang.modules" %%% "scala-parser-combinators" % "2.1.1", - libraryDependencies += "org.scalatest" %%% "scalatest" % "3.2.0" % "test" + libraryDependencies += "org.scala-lang.modules" %%% "scala-parser-combinators" % "2.3.0", + libraryDependencies += "org.scalatest" %%% "scalatest" % "3.2.18" % "test" ) lazy val root = project.in(file(".")). aggregate(pJVM, pJS). @@ -37,11 +37,11 @@ lazy val projs = crossProject(JSPlatform, JVMPlatform).crossType(CrossType.Full) ) .jvmSettings( // Add JVM-specific settings here - libraryDependencies += "org.scala-lang.modules" %% "scala-swing" % "2.1.1", + libraryDependencies += "org.scala-lang.modules" %% "scala-swing" % "3.0.0", assemblyJarName := "FormulaFX.jar" ) .jsSettings( - libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.2.0", + libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.8.0", (Compile / fastOptJS) := (Compile / fastOptJS).dependsOn(generateIndexTask("index-fast.html","fastOpt")).value, (Compile / fullOptJS) := (Compile / fullOptJS).dependsOn(generateIndexTask("index.html","opt")).value ) diff --git a/jvm/src/main/scala/com/github/opengrabeso/formulafx/FormulaFX.scala b/jvm/src/main/scala/com/github/opengrabeso/formulafx/FormulaFX.scala index 531b046..3c741c4 100644 --- a/jvm/src/main/scala/com/github/opengrabeso/formulafx/FormulaFX.scala +++ b/jvm/src/main/scala/com/github/opengrabeso/formulafx/FormulaFX.scala @@ -139,8 +139,8 @@ object FormulaFX extends SimpleSwingApplication { } case ValueChanged(`input`) => computeResult(true) - case ListSelectionChanged(`table`, range, live) => - println(s"$range $live") + //case ListSelectionChanged(`table`, range, live) => + // println(s"$range $live") case TableRowsSelected(`table`, range, false) => input.text = tableData(range.head).text.trim } diff --git a/project/build.properties b/project/build.properties index 9a19778..49214c4 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.8.0 +sbt.version = 1.9.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index e2238da..c11b519 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.2.0") addSbtPlugin("com.codecommit" % "sbt-github-packages" % "0.3.1") diff --git a/shared/src/test/scala/com/github/opengrabeso/formulafx/ExprParserTest.scala b/shared/src/test/scala/com/github/opengrabeso/formulafx/ExprParserTest.scala index 7cd2e56..39b5df1 100644 --- a/shared/src/test/scala/com/github/opengrabeso/formulafx/ExprParserTest.scala +++ b/shared/src/test/scala/com/github/opengrabeso/formulafx/ExprParserTest.scala @@ -14,7 +14,7 @@ trait ExpressionTestUtils { class ExprParserTest extends AnyFlatSpec with Matchers with TypeCheckedTripleEquals with ExpressionTestUtils { - implicit val numberEq = new Equivalence[Try[Number]] { + implicit val numberEq: Equivalence[Try[Number]] = new Equivalence[Try[Number]] { override def areEquivalent(a: Try[Number], b: Try[Number]) = (a, b) match { case (Failure(_), Failure(_)) => true case (Failure(_), Success(_)) => false