Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ ThisBuild / scalaVersion := "3.1.3"
ThisBuild / crossScalaVersions := Seq((ThisBuild / scalaVersion).value, "2.13.8")

lazy val root = project.in(file("."))
.aggregate(collectionContrib.jvm, collectionContrib.js)
.aggregate(collectionContrib.jvm, collectionContrib.js, collectionContrib.native)
.settings(
publish / skip := true,
// With CrossType.Pure, the root project also picks up the sources in `src`
Compile / unmanagedSourceDirectories := Nil,
Test / unmanagedSourceDirectories := Nil,
)

lazy val collectionContrib = crossProject(JVMPlatform, JSPlatform)
lazy val collectionContrib = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("."))
.settings(ScalaModulePlugin.scalaModuleSettings)
Expand All @@ -21,7 +21,7 @@ lazy val collectionContrib = crossProject(JVMPlatform, JSPlatform)
Compile / compile / scalacOptions ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => Seq("-opt-warnings", "-Werror", "-Wconf:origin=scala.collection.IterableOps.toIterable:s")
case _ => Seq("-Xfatal-warnings", "-scala-output-version:3.0", "-Wconf:cat=deprecation:s")
case _ => Seq("-Xfatal-warnings", "-Wconf:cat=deprecation:s")
}
},
Compile / doc / scalacOptions ++= {
Expand All @@ -42,6 +42,12 @@ lazy val collectionContrib = crossProject(JVMPlatform, JSPlatform)
// Scala.js cannot run forked tests
Test / fork := false
)
.nativeEnablePlugins(ScalaNativeJUnitPlugin)
.nativeSettings(
// Scala native cannot run forked tests
Test / fork := false
)

lazy val collectionContribJVM = collectionContrib.jvm
lazy val collectionContribJS = collectionContrib.js
lazy val collectionContribJVM = collectionContrib.jvm
lazy val collectionContribJS = collectionContrib.js
lazy val collectionContribNative = collectionContrib.native
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "3.0.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")