diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d220602..d48466b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,11 +23,11 @@ jobs: distribution: 'temurin' cache: 'sbt' java-version: 21 - - uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1, specifically v1.1.14 + - uses: sbt/setup-sbt@ce95da69b39609ea153bad087708da5f37366897 # v1, specifically v1.5.10 - name: Compile run: sbt -v compile - name: Test - run: sbt -v test + run: sbt -v testFull publish: name: Publish release @@ -45,9 +45,9 @@ jobs: distribution: 'temurin' cache: 'sbt' java-version: 21 - - uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1, specifically v1.1.14 + - uses: sbt/setup-sbt@ce95da69b39609ea153bad087708da5f37366897 # v1, specifically v1.5.10 - name: Compile - run: sbt compile + run: sbt "compile ; shutdown" - name: Publish artifacts run: sbt ci-release env: diff --git a/.scalafmt.conf b/.scalafmt.conf index 6786dce..55b5d66 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,3 +1,8 @@ runner.dialect = scala3 version = 3.8.3 -maxColumn = 120 \ No newline at end of file +maxColumn = 120 +fileOverride { + "glob:**.sbt" { + runner.dialect = scala3 + } +} diff --git a/build.sbt b/build.sbt index 183dbdc..0ce1560 100644 --- a/build.sbt +++ b/build.sbt @@ -2,32 +2,33 @@ import com.softwaremill.SbtSoftwareMillCommon.commonSmlBuildSettings import com.softwaremill.Publish.ossPublishSettings val scala2_12 = "2.12.19" -val scala2_13 = "2.13.14" +val scala2_13 = "2.13.18" val scala2 = List(scala2_12, scala2_13) val scala3 = List("3.3.3") val scalatestVersion = "3.2.19" -excludeLintKeys in Global ++= Set(ideSkipProject) +Global / excludeLintKeys ++= Set(ideSkipProject) -val commonSettings = commonSmlBuildSettings ++ ossPublishSettings ++ Seq( - organization := "com.softwaremill.odelay", - licenses := Seq(("MIT", url(s"https://github.com/softprops/odelay/blob/${version.value}/LICENSE"))) -) +commonSmlBuildSettings +ossPublishSettings + +organization := "com.softwaremill.odelay" +licenses := Seq(License("MIT", url(s"https://github.com/softprops/odelay/blob/${version.value}/LICENSE"))) -val commonJvmSettings = commonSettings ++ Seq( +val commonJvmSettings = Seq( + scalacOptions ++= (if (ScalaArtifacts.isScala3(scalaVersion.value)) Seq.empty else Seq("-release", "8")), ideSkipProject := (scalaVersion.value != scala2_13) ) -val commonJsSettings = commonSettings ++ Seq( +val commonJsSettings = Seq( ideSkipProject := true ) lazy val rootProject = (project in file(".")) - .settings(commonSettings: _*) .settings(publish / skip := true, name := "odelay", scalaVersion := scala2_13) .aggregate( - core.projectRefs ++ testing.projectRefs ++ coreTests.projectRefs ++ netty3.projectRefs ++ netty.projectRefs ++ twitter.projectRefs: _* + core.projectRefs ++ testing.projectRefs ++ coreTests.projectRefs ++ netty3.projectRefs ++ netty.projectRefs ++ twitter.projectRefs* ) lazy val core = (projectMatrix in file("odelay-core")) @@ -47,7 +48,7 @@ lazy val core = (projectMatrix in file("odelay-core")) lazy val testing = (projectMatrix in file("odelay-testing")) .settings( name := "odelay-testing", - libraryDependencies += "org.scalatest" %%% "scalatest" % scalatestVersion % Test, + libraryDependencies += "org.scalatest" %% "scalatest" % scalatestVersion % Test, publish / skip := true ) .jvmPlatform( @@ -57,7 +58,7 @@ lazy val testing = (projectMatrix in file("odelay-testing")) .jsPlatform( scalaVersions = scala2 ++ scala3, settings = commonJsSettings ++ Seq( - libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.4.0" + libraryDependencies += "io.github.cquiroz" %% "scala-java-time" % "2.4.0" ) ) .dependsOn(core) diff --git a/project/build.properties b/project/build.properties index ee4c672..ddca111 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.1 +sbt.version=2.0.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index d4f6bc0..cf085b4 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,9 +1,8 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") -addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.22.0") -val sbtSoftwareMillVersion = "2.0.20" +val sbtSoftwareMillVersion = "3.0.1" addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-common" % sbtSoftwareMillVersion) addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-publish" % sbtSoftwareMillVersion) addSbtPlugin("com.softwaremill.sbt-softwaremill" % "sbt-softwaremill-browser-test-js" % sbtSoftwareMillVersion) -addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "1.1.0") +addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.4")