Skip to content

Commit

Permalink
play-json 2.10, JDK 11, scala-native
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Sep 15, 2023
1 parent f2df476 commit b9e80bf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
distribution: temurin
- uses: coursier/cache-action@v6
- run: sbt -v
-J-Xmx5G
"+ scalafmtCheckAll"
scalafmtSbtCheck
"+ test"
11 changes: 7 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand All @@ -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
)
Expand Down
4 changes: 4 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b9e80bf

Please sign in to comment.