From 2efe800c83bf6e46562438dd43cf4b46d485bc39 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 24 Sep 2022 20:15:03 +0200 Subject: [PATCH] add support for scala-native --- build.sbt | 34 +++++++++++++++++++++------------- project/build.properties | 2 +- project/plugins.sbt | 6 ++++-- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/build.sbt b/build.sbt index 02c434e..148586a 100644 --- a/build.sbt +++ b/build.sbt @@ -1,12 +1,10 @@ -import sbtcrossproject.{ crossProject, CrossType } - -lazy val catsVersion = "2.6.1" -lazy val fs2CoreVersion = "2.5.6" -lazy val scalacheckVersion = "1.15.4" +lazy val catsVersion = "2.8.0" +lazy val fs2CoreVersion = "3.3.0" +lazy val scalacheckVersion = "1.17.0" lazy val scala212 = "2.12.16" lazy val scala213 = "2.13.6" -lazy val scala30 = "3.0.2" +lazy val scala30 = "3.1.2" lazy val commonSettings = Seq( organization := "org.tpolecat", @@ -35,13 +33,23 @@ lazy val commonSettings = Seq( lazy val atto = // defined so we can exclude docs from aggregate project .in(file(".")) - .dependsOn(core.jvm, core.js, fs2.jvm, fs2.js, refined.jvm, refined.js, tests.jvm, tests.js) - .aggregate(core.jvm, core.js, fs2.jvm, fs2.js, refined.jvm, refined.js, tests.jvm, tests.js) + .dependsOn( + core.jvm, core.js, core.native, + fs2.jvm, fs2.js, fs2.native, + refined.jvm, refined.js, refined.native, + tests.jvm, tests.js, tests.native + ) + .aggregate( + core.jvm, core.js, core.native, + fs2.jvm, fs2.js, fs2.native, + refined.jvm, refined.js, refined.native, + tests.jvm, tests.js, tests.native + ) .settings(commonSettings) .settings(publish / skip := true) lazy val core = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/core")) .settings(commonSettings) @@ -49,7 +57,7 @@ lazy val core = .settings(libraryDependencies += "org.typelevel" %%% "cats-core" % catsVersion) lazy val fs2 = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/fs2")) .dependsOn(core) @@ -63,18 +71,18 @@ lazy val fs2 = ) lazy val refined = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/refined")) .dependsOn(core) .settings(commonSettings) .settings( name := "atto-refined", - libraryDependencies += "eu.timepit" %%% "refined" % "0.9.26", + libraryDependencies += "eu.timepit" %%% "refined" % "0.10.1", ) lazy val tests = - crossProject(JSPlatform, JVMPlatform) + crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("modules/tests")) .dependsOn(core, refined) diff --git a/project/build.properties b/project/build.properties index 88dc997..b1e589d 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.8 \ No newline at end of file +sbt.version=1.7.1 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 02b6718..859b8ee 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,6 +4,8 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.3") addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.20") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.1") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")