Skip to content

Commit

Permalink
Updated sbt plugins and upgraded to Scala 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Martomate committed Sep 26, 2022
1 parent 7435b38 commit 6fd2410
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version = "3.5.3"
runner.dialect = scala3
maxColumn = 100
15 changes: 4 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "3.1.2"
scalaVersion := "3.2.0"

name := "TriPaint"
organization := "com.martomate"
Expand All @@ -17,8 +17,6 @@ jlinkIgnoreMissingDependency := JlinkIgnore.only(
"scalafx.scene.web" -> "javafx.scene.web"
)

jlinkModules += "jdk.unsupported"

jlinkOptions ++= Seq(
"--no-header-files",
"--no-man-pages",
Expand All @@ -28,14 +26,9 @@ jlinkOptions ++= Seq(
Compile / scalacOptions += "-deprecation"

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.11" % "test",
"org.scalatestplus" %% "mockito-4-2" % "3.2.11.0" % "test"
"org.scalatest" %% "scalatest" % "3.2.12" % "test",
"org.scalatestplus" %% "mockito-4-5" % "3.2.12.0" % "test"
)

// Add dependency on ScalaFX library
libraryDependencies += "org.scalafx" %% "scalafx" % "17.0.1-R26"

lazy val javaFXModules = Seq("base", "controls", "graphics", "media")
libraryDependencies ++= javaFXModules.map { m =>
"org.openjfx" % s"javafx-$m" % "17.0.2"
}
libraryDependencies += "org.scalafx" %% "scalafx" % "18.0.2-R29"
7 changes: 4 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.2")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.2")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.11")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class NewActionTest extends AnyFlatSpec with Matchers {

val expectedImage = RegularImage.fill(imageSize, imageSize, backgroundColor)

val actualImage = model.imageGrid(TriImageCoords(3, 4))
val actualImage = model
.imageGrid(TriImageCoords(3, 4))
.map(_.storage)
.map(_.toRegularImage(new SimpleStorageFormat))
.orNull
Expand All @@ -35,7 +36,8 @@ class NewActionTest extends AnyFlatSpec with Matchers {

new NewAction(model, null, () => None).perform()

val actualImage = model.imageGrid(TriImageCoords(3, 4))
val actualImage = model
.imageGrid(TriImageCoords(3, 4))
.map(_.storage)
.map(_.toRegularImage(new SimpleStorageFormat))
.orNull
Expand All @@ -56,7 +58,8 @@ class NewActionTest extends AnyFlatSpec with Matchers {

val expectedImage = RegularImage.fill(imageSize, imageSize, backgroundColor)

val actualImage = model.imageGrid(TriImageCoords(3, 4))
val actualImage = model
.imageGrid(TriImageCoords(3, 4))
.map(_.storage)
.map(_.toRegularImage(new SimpleStorageFormat))
.orNull
Expand Down

0 comments on commit 6fd2410

Please sign in to comment.