diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85f9ed15..5171aa28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: scala: - { name: "Scala 2", version: "2.12.13", binary-version: "2.12", java-version: "11", java-distribution: "temurin", report: "" } - { name: "Scala 2", version: "2.13.6", binary-version: "2.13", java-version: "11", java-distribution: "temurin", report: "report" } - - { name: "Scala 3", version: "3.0.2", binary-version: "3", java-version: "11", java-distribution: "temurin", report: "" } + - { name: "Scala 3", version: "3.1.3", binary-version: "3", java-version: "11", java-distribution: "temurin", report: "" } steps: - uses: actions/checkout@v4.1.1 diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 59dfb064..e9ccd472 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -22,7 +22,7 @@ jobs: scala: - { name: "Scala 2", version: "2.12.13", binary-version: "2.12", java-version: "11", java-distribution: "temurin", report: "" } - { name: "Scala 2", version: "2.13.6", binary-version: "2.13", java-version: "11", java-distribution: "temurin", report: "" } -# - { name: "Scala 3", version: "3.0.2", binary-version: "3", java-version: "11", java-distribution: "temurin", report: "" } +# - { name: "Scala 3", version: "3.1.3", binary-version: "3", java-version: "11", java-distribution: "temurin", report: "" } steps: - uses: actions/checkout@v4.1.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b45de8f..3b296f18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: scala: - { name: "Scala 2", version: "2.12.13", binary-version: "2.12", java-version: "11", java-distribution: "temurin", report: "" } - { name: "Scala 2", version: "2.13.6", binary-version: "2.13", java-version: "11", java-distribution: "temurin", report: "report" } - - { name: "Scala 3", version: "3.0.2", binary-version: "3", java-version: "11", java-distribution: "temurin", report: "" } + - { name: "Scala 3", version: "3.1.3", binary-version: "3", java-version: "11", java-distribution: "temurin", report: "" } steps: - uses: actions/checkout@v4.1.1 diff --git a/build.sbt b/build.sbt index dc982695..6cdc41ae 100644 --- a/build.sbt +++ b/build.sbt @@ -55,27 +55,37 @@ lazy val effectie = (project in file(".")) .aggregate( testing4CatsJvm, testing4CatsJs, + testing4CatsNative, coreJvm, coreJs, + coreNative, syntaxJvm, syntaxJs, + syntaxNative, timeJvm, timeJs, + timeNative, catsJvm, catsJs, + catsNative, catsEffect2Jvm, catsEffect2Js, + catsEffect2Native, catsEffect2TimeJvm, catsEffect2TimeJs, + catsEffect2TimeNative, catsEffect3Jvm, catsEffect3Js, + catsEffect3Native, catsEffect3TimeJvm, catsEffect3TimeJs, + catsEffect3TimeNative, monix3Jvm, monix3Js, + monix3Native, ) -lazy val core = module(ProjectName("core"), crossProject(JVMPlatform, JSPlatform)) +lazy val core = module(ProjectName("core"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Core", libraryDependencies ++= List( @@ -93,13 +103,14 @@ lazy val core = module(ProjectName("core"), crossProject(JVMPlatform, JSPlatform ) .dependsOn(testing4Cats % Test) -lazy val coreJvm = core.jvm -lazy val coreJs = core +lazy val coreJvm = core.jvm +lazy val coreJs = core .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val coreNative = core.native.settings(nativeSettings) -lazy val syntax = module(ProjectName("syntax"), crossProject(JVMPlatform, JSPlatform)) +lazy val syntax = module(ProjectName("syntax"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Syntax", libraryDependencies ++= List( @@ -111,12 +122,13 @@ lazy val syntax = module(ProjectName("syntax"), crossProject(JVMPlatform, JSP libraryDependenciesPostProcess(isScala3(scalaVersion.value), libraryDependencies.value), ) .dependsOn(core % props.IncludeTest) -lazy val syntaxJvm = syntax.jvm -lazy val syntaxJs = syntax +lazy val syntaxJvm = syntax.jvm +lazy val syntaxJs = syntax .js .settings(jsSettings) +lazy val syntaxNative = syntax.native.settings(nativeSettings) -lazy val cats = module(ProjectName("cats"), crossProject(JVMPlatform, JSPlatform)) +lazy val cats = module(ProjectName("cats"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Cats", libraryDependencies ++= List( @@ -133,13 +145,14 @@ lazy val cats = module(ProjectName("cats"), crossProject(JVMPlatform, JSPlatform testing4Cats % Test, ) -lazy val catsJvm = cats.jvm -lazy val catsJs = cats +lazy val catsJvm = cats.jvm +lazy val catsJs = cats .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val catsNative = cats.native.settings(nativeSettings) -lazy val testing4Cats = module(ProjectName("test4cats"), crossProject(JVMPlatform, JSPlatform)) +lazy val testing4Cats = module(ProjectName("test4cats"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect's test utils for Cats", libraryDependencies := @@ -150,12 +163,13 @@ lazy val testing4Cats = module(ProjectName("test4cats"), crossProject(JVMPlat console / initialCommands := """import effectie.testing.cats._""", ) -lazy val testing4CatsJvm = testing4Cats.jvm -lazy val testing4CatsJs = testing4Cats +lazy val testing4CatsJvm = testing4Cats.jvm +lazy val testing4CatsJs = testing4Cats .js .settings(jsSettings) +lazy val testing4CatsNative = testing4Cats.native.settings(nativeSettings) -lazy val time = module(ProjectName("time"), crossProject(JVMPlatform, JSPlatform)) +lazy val time = module(ProjectName("time"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Time", libraryDependencies ++= List( @@ -178,13 +192,14 @@ lazy val time = module(ProjectName("time"), crossProject(JVMPlatform, JSPlatform testing4Cats % Test, ) -lazy val timeJvm = time.jvm -lazy val timeJs = time +lazy val timeJvm = time.jvm +lazy val timeJs = time .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val timeNative = time.native.settings(nativeSettings) -lazy val catsEffect2 = module(ProjectName("cats-effect2"), crossProject(JVMPlatform, JSPlatform)) +lazy val catsEffect2 = module(ProjectName("cats-effect2"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Cats Effect 2", libraryDependencies := @@ -216,13 +231,14 @@ lazy val catsEffect2 = module(ProjectName("cats-effect2"), crossProject(JVMPl cats % props.IncludeTest, testing4Cats % Test, ) -lazy val catsEffect2Jvm = catsEffect2.jvm -lazy val catsEffect2Js = catsEffect2 +lazy val catsEffect2Jvm = catsEffect2.jvm +lazy val catsEffect2Js = catsEffect2 .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val catsEffect2Native = catsEffect2.native.settings(nativeSettings) -lazy val catsEffect2Time = module(ProjectName("cats-effect2-time"), crossProject(JVMPlatform, JSPlatform)) +lazy val catsEffect2Time = module(ProjectName("cats-effect2-time"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Time with Cats Effect 2", libraryDependencies := @@ -230,12 +246,12 @@ lazy val catsEffect2Time = module(ProjectName("cats-effect2-time"), crossProject case SemVer(Major(2), Minor(11), _, _, _) => libraryDependencies.value ++ Seq(libs.libCatsCore_2_0_0, libs.libCatsEffect_2_0_0) case SemVer( - Major(3), - Minor(0), - Patch(0), - Some(PreRelease(List(Dsv(List(Anh.Alphabet("RC"), Anh.Num("1")))))), - _, - ) => + Major(3), + Minor(0), + Patch(0), + Some(PreRelease(List(Dsv(List(Anh.Alphabet("RC"), Anh.Num("1")))))), + _, + ) => libraryDependencies.value ++ Seq( libs.libCatsCore(props.catsVersion), libs.libCatsEffect(props.catsEffect2Version), @@ -253,14 +269,14 @@ lazy val catsEffect2Time = module(ProjectName("cats-effect2-time"), crossProject syntax % props.IncludeTest, time, ) -lazy val catsEffect2TimeJvm = catsEffect2Time.jvm -lazy val catsEffect2TimeJs = catsEffect2Time +lazy val catsEffect2TimeJvm = catsEffect2Time.jvm +lazy val catsEffect2TimeJs = catsEffect2Time .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val catsEffect2TimeNative = catsEffect2Time.native.settings(nativeSettings) - -lazy val catsEffect3 = module(ProjectName("cats-effect3"), crossProject(JVMPlatform, JSPlatform)) +lazy val catsEffect3 = module(ProjectName("cats-effect3"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Cats Effect 3", libraryDependencies ++= List( @@ -279,13 +295,14 @@ lazy val catsEffect3 = module(ProjectName("cats-effect3"), crossProject(JVMPl cats % props.IncludeTest, testing4Cats % Test, ) -lazy val catsEffect3Jvm = catsEffect3.jvm -lazy val catsEffect3Js = catsEffect3 +lazy val catsEffect3Jvm = catsEffect3.jvm +lazy val catsEffect3Js = catsEffect3 .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val catsEffect3Native = catsEffect3.native.settings(nativeSettings) -lazy val catsEffect3Time = module(ProjectName("cats-effect3-time"), crossProject(JVMPlatform, JSPlatform)) +lazy val catsEffect3Time = module(ProjectName("cats-effect3-time"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Time with Cats Effect 3", libraryDependencies ++= List( @@ -301,14 +318,14 @@ lazy val catsEffect3Time = module(ProjectName("cats-effect3-time"), crossProject syntax % props.IncludeTest, time, ) -lazy val catsEffect3TimeJvm = catsEffect3Time.jvm -lazy val catsEffect3TimeJs = catsEffect3Time +lazy val catsEffect3TimeJvm = catsEffect3Time.jvm +lazy val catsEffect3TimeJs = catsEffect3Time .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val catsEffect3TimeNative = catsEffect3Time.native.settings(nativeSettings) - -lazy val monix3 = module(ProjectName("monix3"), crossProject(JVMPlatform, JSPlatform)) +lazy val monix3 = module(ProjectName("monix3"), crossProject(JVMPlatform, JSPlatform, NativePlatform)) .settings( description := "Effect Utils - Monix 3", libraryDependencies := @@ -330,11 +347,12 @@ lazy val monix3 = module(ProjectName("monix3"), crossProject(JVMPlatform, JSP catsEffect2 % props.IncludeTest, testing4Cats % Test, ) -lazy val monix3Jvm = monix3.jvm -lazy val monix3Js = monix3 +lazy val monix3Jvm = monix3.jvm +lazy val monix3Js = monix3 .js .settings(jsSettingsForFuture) .settings(jsSettings) +lazy val monix3Native = monix3.native.settings(nativeSettings) lazy val docs = (project in file("docs-gen-tmp/docs")) .enablePlugins(MdocPlugin, DocusaurPlugin) @@ -429,11 +447,11 @@ lazy val props = ) final val Scala2Version = Scala2Versions.head - final val Scala3Version = "3.0.2" + final val Scala3Version = "3.1.3" // final val ProjectScalaVersion = "2.12.13" - final val ProjectScalaVersion = Scala2Version -// final val ProjectScalaVersion = Scala3Version +// final val ProjectScalaVersion = Scala2Version + final val ProjectScalaVersion = Scala3Version lazy val licenses = List("MIT" -> url("http://opensource.org/licenses/MIT")) @@ -642,3 +660,7 @@ lazy val jsSettingsForFuture: SettingsDefinition = List( lazy val jsSettings: SettingsDefinition = List( Test / fork := false ) + +lazy val nativeSettings: SettingsDefinition = List( + Test / fork := false +) diff --git a/project/plugins.sbt b/project/plugins.sbt index 7424ac58..24a10149 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -13,6 +13,11 @@ addSbtPlugin("io.kevinlee" % "sbt-docusaur" % "0.15.0") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.11") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") + +addSbtPlugin("org.scalameta" % "sbt-native-image" % "0.3.2") + val sbtDevOopsVersion = "3.0.0" addSbtPlugin("io.kevinlee" % "sbt-devoops-scala" % sbtDevOopsVersion) addSbtPlugin("io.kevinlee" % "sbt-devoops-sbt-extra" % sbtDevOopsVersion)