Skip to content

Commit

Permalink
Update sbt-scalajs to 1.15.0 (#325)
Browse files Browse the repository at this point in the history
* Update sbt-scalajs to 1.15.0

* move dependencies versions out of build.sbt file, update to Scala.js 1.15.0

---------

Co-authored-by: Kai <450507+neko-kai@users.noreply.github.com>
  • Loading branch information
scala-steward and neko-kai authored Feb 20, 2024
1 parent a52d2f3 commit e73b396
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
26 changes: 10 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ ThisBuild / publishTo :=(if (!isSnapshot.value) {
Some(Opts.resolver.sonatypeSnapshots)
})

val scalaJsVersion = "1.13.2"
val scalaNativeVersion = "0.4.17"
val crossProjectVersion = "1.3.1"
val bundlerVersion = "0.21.1"
val sbtJsDependenciesVersion = "1.0.2"

val scalaOpts = scalacOptions ++= ((isSnapshot.value, scalaVersion.value) match {
case (_, ScalaVersions.scala_212) => Seq(
"-Xsource:2.13",
Expand Down Expand Up @@ -114,11 +108,11 @@ lazy val sbtgen = (project in file("sbtgen"))
s"-Xmacro-settings:sbt-version=${sbtVersion.value}",
s"-Xmacro-settings:scala-version=${scalaVersion.value}",
s"-Xmacro-settings:scala-versions=${crossScalaVersions.value.mkString(":")}",
s"-Xmacro-settings:scala-js-version=$scalaJsVersion",
s"-Xmacro-settings:scala-native-version=$scalaNativeVersion",
s"-Xmacro-settings:crossproject-version=$crossProjectVersion",
s"-Xmacro-settings:bundler-version=$bundlerVersion",
s"-Xmacro-settings:sbt-js-dependencies-version=$sbtJsDependenciesVersion",
s"-Xmacro-settings:scala-js-version=${ScalaVersions.scalaJsVersion}",
s"-Xmacro-settings:scala-native-version=${ScalaVersions.scalaNativeVersion}",
s"-Xmacro-settings:crossproject-version=${Deps.crossProjectVersion}",
s"-Xmacro-settings:bundler-version=${Deps.bundlerVersion}",
s"-Xmacro-settings:sbt-js-dependencies-version=${Deps.sbtJsDependenciesVersion}",
),
scalaOpts,
)
Expand Down Expand Up @@ -159,11 +153,11 @@ lazy val `sbt-izumi` = (project in file("sbt/sbt-izumi"))
("com.github.sbt" % "sbt-duplicates-finder" % "1.1.0").extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
),
libraryDependencies ++= Seq(
("org.scala-js" % "sbt-scalajs" % scalaJsVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("org.scala-native" % "sbt-scala-native" % scalaNativeVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("org.portable-scala" % "sbt-scalajs-crossproject" % crossProjectVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("ch.epfl.scala" % "sbt-scalajs-bundler" % bundlerVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("org.scala-js" % "sbt-jsdependencies" % sbtJsDependenciesVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("org.scala-js" % "sbt-scalajs" % ScalaVersions.scalaJsVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("org.scala-native" % "sbt-scala-native" % ScalaVersions.scalaNativeVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("org.portable-scala" % "sbt-scalajs-crossproject" % Deps.crossProjectVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("ch.epfl.scala" % "sbt-scalajs-bundler" % Deps.bundlerVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
("org.scala-js" % "sbt-jsdependencies" % Deps.sbtJsDependenciesVersion % Test).extra(SbtVersionKey -> (pluginCrossBuild / sbtBinaryVersion).value, ScalaVersionKey -> (update / scalaBinaryVersion).value).withCrossVersion(Disabled()),
),
scalaOpts,
)
Expand Down
5 changes: 5 additions & 0 deletions project/Deps.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
object Deps {
val crossProjectVersion = "1.3.1"
val bundlerVersion = "0.21.1"
val sbtJsDependenciesVersion = "1.0.2"
}
3 changes: 3 additions & 0 deletions project/ScalaVersions.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
object ScalaVersions {
val scala_212 = "2.12.18"
val scala_213 = "2.13.12"

val scalaJsVersion = "1.15.0"
val scalaNativeVersion = "0.4.17"
}
2 changes: 1 addition & 1 deletion test/js/dotty/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// IT IS AUTOGENERATED BY `sbtgen.sc` SCRIPT
// ALL CHANGES WILL BE LOST
// https://www.scala-js.org/
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0")

// https://github.com/portable-scala/sbt-crossproject
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.1")
Expand Down
2 changes: 1 addition & 1 deletion test/js/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// IT IS AUTOGENERATED BY `sbtgen.sc` SCRIPT
// ALL CHANGES WILL BE LOST
// https://www.scala-js.org/
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0")

// https://github.com/portable-scala/sbt-crossproject
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.1")
Expand Down

0 comments on commit e73b396

Please sign in to comment.