diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73470e0..92970c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ jobs: distribution: temurin - uses: coursier/cache-action@v6 - run: sbt -v + -J-Xmx5G "+ scalafmtCheckAll" scalafmtSbtCheck "+ test" diff --git a/build.sbt b/build.sbt index 0d198ee..ddbba89 100644 --- a/build.sbt +++ b/build.sbt @@ -60,21 +60,21 @@ lazy val macros = project scalapbPlayJsonJVM, ) -lazy val tests = crossProject(JVMPlatform, JSPlatform) +lazy val tests = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("tests")) .settings( commonSettings, noPublish, ) .configure(_ dependsOn macros) - .platformsSettings(JSPlatform)( + .platformsSettings(JSPlatform, NativePlatform)( disableScala3, ) .dependsOn( scalapbPlayJson % "test->test", ) -val scalapbPlayJson = crossProject(JVMPlatform, JSPlatform) +val scalapbPlayJson = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("core")) .enablePlugins(BuildInfoPlugin) .settings( @@ -114,6 +114,9 @@ val scalapbPlayJson = crossProject(JVMPlatform, JSPlatform) "com.google.protobuf" % "protobuf-java" % "3.24.3" % "protobuf" ) ) + .nativeSettings( + scalapropsNativeSettings + ) .jsSettings( buildInfoKeys ++= Seq[BuildInfoKey]( "scalajsVersion" -> scalaJSVersion @@ -128,7 +131,7 @@ val scalapbPlayJson = crossProject(JVMPlatform, JSPlatform) } }, ) - .platformsSettings(JSPlatform)( + .platformsSettings(JSPlatform, NativePlatform)( Test / PB.targets ++= Seq[protocbridge.Target]( scalapb.gen(javaConversions = false) -> (Test / sourceManaged).value ) diff --git a/core/js/src/test/scala/scalapb_playjson/JavaAssertionsPlatform.scala b/core/js-native/src/test/scala/scalapb_playjson/JavaAssertionsPlatform.scala similarity index 100% rename from core/js/src/test/scala/scalapb_playjson/JavaAssertionsPlatform.scala rename to core/js-native/src/test/scala/scalapb_playjson/JavaAssertionsPlatform.scala diff --git a/project/plugins.sbt b/project/plugins.sbt index bb5ef34..088d4ab 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,6 +6,10 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") + +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.15") + addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")