Skip to content

Commit

Permalink
Update depenencies for Scala Native 0.5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszKubuszok committed May 30, 2024
1 parent 4623bc3 commit 6cfeb05
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
27 changes: 19 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ val versions = new {
// Which version should be used in IntelliJ
val ideScala = scala3
val idePlatform = VirtualAxis.jvm

// Dependencies
val cats = "2.12.0"
val kindProjector = "0.13.3"
val munit = "1.0.0"
val scalaCollectionCompat = "2.12.0"
val scalaJavaCompat = "1.0.2"
val scalaJavaTime = "2.5.0"
// we had to manually bump scalapb-runtime version for Scala Native 0.5.x
// val scalapbRuntime = scalapb.compiler.Version.scalapbVersion
val scalapbRuntime = "0.8.15"
}

// Common settings:
Expand Down Expand Up @@ -204,15 +215,15 @@ val settings = Seq(

val dependencies = Seq(
libraryDependencies ++= Seq(
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.11.0",
"org.scalameta" %%% "munit" % "1.0.0" % Test
"org.scala-lang.modules" %%% "scala-collection-compat" % versions.scalaCollectionCompat,
"org.scalameta" %%% "munit" % versions.munit % Test
),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) =>
Seq(
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided,
compilerPlugin("org.typelevel" % "kind-projector" % "0.13.3" cross CrossVersion.full)
compilerPlugin("org.typelevel" % "kind-projector" % versions.kindProjector cross CrossVersion.full)
)
case _ => Seq.empty
}
Expand Down Expand Up @@ -438,8 +449,8 @@ lazy val chimneyCats = projectMatrix
.settings(dependencies *)
.settings(
Compile / console / initialCommands := "import io.scalaland.chimney.*, io.scalaland.chimney.dsl.*, io.scalaland.chimney.cats.*",
libraryDependencies += "org.typelevel" %%% "cats-core" % "2.10.0",
libraryDependencies += "org.typelevel" %%% "cats-laws" % "2.10.0" % Test
libraryDependencies += "org.typelevel" %%% "cats-core" % versions.cats,
libraryDependencies += "org.typelevel" %%% "cats-laws" % versions.cats % Test
)
.dependsOn(chimney % s"$Test->$Test;$Compile->$Compile")

Expand All @@ -459,7 +470,7 @@ lazy val chimneyJavaCollections = projectMatrix
.settings(
Compile / console / initialCommands := "import io.scalaland.chimney.*, io.scalaland.chimney.dsl.*, io.scalaland.chimney.javacollections.*",
// Scala 2.12 doesn't have scala.jdk.StreamConverters and we use it in test of java.util.stream type class instances
libraryDependencies += "org.scala-lang.modules" %%% "scala-java8-compat" % "1.0.2" % Test
libraryDependencies += "org.scala-lang.modules" %%% "scala-java8-compat" % versions.scalaJavaCompat % Test
)
.dependsOn(chimney % s"$Test->$Test;$Compile->$Compile")

Expand All @@ -471,7 +482,7 @@ lazy val chimneyProtobufs = projectMatrix
.Settings(
// Scala.js and Scala Native decided to not implement java.time and let an external library do it,
// meanwhile we want to provide some type class instances for types in java.time.
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.5.0"
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % versions.scalaJavaTime
)) *
)
.enablePlugins(GitVersioning, GitBranchPrompt)
Expand Down Expand Up @@ -501,7 +512,7 @@ lazy val chimneyProtobufs = projectMatrix
Compile / PB.targets := Seq(scalapb.gen() -> (Compile / sourceManaged).value / "scalapb"),
Test / PB.protoSources += PB.externalSourcePath.value,
Test / PB.targets := Seq(scalapb.gen() -> (Test / sourceManaged).value / "scalapb"),
libraryDependencies += "com.thesamet.scalapb" %%% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % ProtobufConfig
libraryDependencies += "com.thesamet.scalapb" %%% "scalapb-runtime" % versions.scalapbRuntime % ProtobufConfig
)
.dependsOn(chimney % s"$Test->$Test;$Compile->$Compile")

Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")
addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.10.0")
addSbtPlugin("com.indoorvivants" % "sbt-commandmatrix" % "0.0.5")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.2")
// publishing
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
Expand All @@ -20,7 +20,7 @@ addSbtPlugin("org.jetbrains" % "sbt-ide-settings" % "1.1.0")
// testing protobufs
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.15"
//
// documentation
addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.4.0")

ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always

0 comments on commit 6cfeb05

Please sign in to comment.