Skip to content

Commit 20d0e22

Browse files
authored
Cross compile ujson.circe to scala native (#680)
This PR cross compiles ujson.circe to SN to enable softwaremill/sttp-openai#396
1 parent 1b79861 commit 20d0e22

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

build.mill

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,20 @@ object ujson extends Module{
219219
)
220220
}
221221

222-
object circe extends Cross[CirceModule](scalaVersions)
223-
trait CirceModule extends CommonPublishModule{
224-
def moduleDeps = Seq(ujson.jvm())
225-
val circeVersion = "0.14.9"
226-
def mvnDeps = Seq(mvn"io.circe::circe-parser:$circeVersion")
222+
object circe extends Module {
223+
object jvm extends Cross[CirceJvmModule](scalaVersions)
224+
trait CirceJvmModule extends CommonJvmModule{
225+
def moduleDeps = Seq(ujson.jvm())
226+
val circeVersion = "0.14.14"
227+
def mvnDeps = Seq(mvn"io.circe::circe-parser:$circeVersion")
228+
}
229+
230+
object native extends Cross[CirceNativeModule](scalaVersions)
231+
trait CirceNativeModule extends CommonNativeModule{
232+
def moduleDeps = Seq(ujson.native())
233+
val circeVersion = "0.14.14"
234+
def mvnDeps = Seq(mvn"io.circe::circe-parser:$circeVersion")
235+
}
227236
}
228237

229238
object play extends Cross[PlayModule](scala2JVMVersions)
@@ -378,7 +387,7 @@ object upickle extends Module{
378387
Seq(core.jvm().test) ++
379388
(
380389
if (isDotty) Nil
381-
else Seq(ujson.argonaut(), ujson.circe(), ujson.json4s(), ujson.play())
390+
else Seq(ujson.argonaut(), ujson.circe.jvm(), ujson.json4s(), ujson.play())
382391
)
383392
}
384393

@@ -417,9 +426,9 @@ trait BenchModule extends CommonPlatformModule{
417426
def crossScalaVersion = scala213
418427
def scalaVersion = scala213
419428
def mvnDeps = Seq(
420-
mvn"io.circe::circe-core::0.14.9",
421-
mvn"io.circe::circe-generic::0.14.9",
422-
mvn"io.circe::circe-parser::0.14.9",
429+
mvn"io.circe::circe-core::0.14.14",
430+
mvn"io.circe::circe-generic::0.14.14",
431+
mvn"io.circe::circe-parser::0.14.14",
423432
mvn"com.typesafe.play::play-json::2.9.4",
424433
mvn"io.argonaut::argonaut:6.2.6",
425434
mvn"org.json4s::json4s-ast:3.6.12",

0 commit comments

Comments
 (0)