From 2a0d40bc97d9e66a767707095c34722dd689268d Mon Sep 17 00:00:00 2001 From: Dejan Mijic Date: Sun, 15 Feb 2026 12:24:23 +0100 Subject: [PATCH 1/4] Upgrade the dependency --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 90bd8dd4d..dfc58c9ea 100644 --- a/build.sbt +++ b/build.sbt @@ -789,7 +789,7 @@ lazy val zioJson = (projectMatrix in file("json/zio-json")) .settings( name := "zio-json", libraryDependencies ++= Seq( - "dev.zio" %%% "zio-json" % "0.7.44", + "dev.zio" %%% "zio-json" % "0.9.0", "com.softwaremill.sttp.shared" %%% "zio" % sttpSharedVersion ), scalaTest From ba1c14c963e62592dc733996cd07fcb3882f60ea Mon Sep 17 00:00:00 2001 From: Dejan Mijic Date: Sun, 15 Feb 2026 13:48:41 +0100 Subject: [PATCH 2/4] Mark zio-json as "loom" project --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index dfc58c9ea..3f4644ee6 100644 --- a/build.sbt +++ b/build.sbt @@ -176,7 +176,7 @@ val slf4jVersion = "1.7.36" val compileAndTest = "compile->compile;test->test" -lazy val loomProjects: Seq[String] = Seq(ox, examples).flatMap(_.projectRefs).flatMap(projectId) +lazy val loomProjects: Seq[String] = Seq(ox, examples, zioJson).flatMap(_.projectRefs).flatMap(projectId) def projectId(projectRef: ProjectReference): Option[String] = projectRef match { From f1e031059861135c51bb17b576460fa57a77ef4a Mon Sep 17 00:00:00 2001 From: Dejan Mijic Date: Sun, 15 Feb 2026 14:14:29 +0100 Subject: [PATCH 3/4] Drop include/exclude --- .github/workflows/ci.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11f7faba2..76364a04a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,12 +23,6 @@ jobs: scala-version: [ "2.12", "2.13", "3" ] target-platform: [ "JVM", "JS", "Native" ] java: [ "11", "21" ] - exclude: - - java: "21" - include: # Restricted to build only specific Loom-based modules - - scala-version: "3" - target-platform: "JVM" - java: "21" steps: - name: Checkout uses: actions/checkout@v2 @@ -51,7 +45,7 @@ jobs: with: jvm: '' # needed because scala-cli-setup otherwise forces the installation of their default JVM (17) - name: Enable Loom-specific modules - if: matrix.java == '21' + if: matrix.target-platform == 'JVM' && matrix.java == '21' && matrix.scala-version == '3' run: echo "ONLY_LOOM=1" >> $GITHUB_ENV - name: Compile run: sbt -v "compileScoped ${{ matrix.scala-version }} ${{ matrix.target-platform }}" @@ -100,10 +94,10 @@ jobs: sudo apt-get update sudo apt-get install libidn2-dev libcurl3-dev - name: Enable Native-specific modules - if: matrix.java == '11' + if: matrix.target-platform == 'Native' run: echo "STTP_NATIVE=1" >> $GITHUB_ENV - name: Enable Loom-specific modules - if: matrix.java == '21' + if: matrix.target-platform == 'JVM' && matrix.java == '21' && matrix.scala-version == '3' run: echo "ONLY_LOOM=1" >> $GITHUB_ENV - name: Compile run: sbt compile From d043881db85f6c473189aaae56686a07aa9125fb Mon Sep 17 00:00:00 2001 From: Dejan Mijic Date: Sun, 15 Feb 2026 14:36:23 +0100 Subject: [PATCH 4/4] Adjust the build matrix --- .github/workflows/ci.yml | 6 ++++++ build.sbt | 17 ++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76364a04a..48653386d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,9 @@ jobs: uses: VirtusLab/scala-cli-setup@77834b5926f3eb70869d8009530c65585f7a039b # main, specifically v1.9.1 with: jvm: '' # needed because scala-cli-setup otherwise forces the installation of their default JVM (17) + - name: Enable ZIO-specific modules + if: matrix.java == '21' + run: echo "WITH_ZIO=1" >> $GITHUB_ENV - name: Enable Loom-specific modules if: matrix.target-platform == 'JVM' && matrix.java == '21' && matrix.scala-version == '3' run: echo "ONLY_LOOM=1" >> $GITHUB_ENV @@ -96,6 +99,9 @@ jobs: - name: Enable Native-specific modules if: matrix.target-platform == 'Native' run: echo "STTP_NATIVE=1" >> $GITHUB_ENV + - name: Enable ZIO-specific modules + if: matrix.java == '21' + run: echo "WITH_ZIO=1" >> $GITHUB_ENV - name: Enable Loom-specific modules if: matrix.target-platform == 'JVM' && matrix.java == '21' && matrix.scala-version == '3' run: echo "ONLY_LOOM=1" >> $GITHUB_ENV diff --git a/build.sbt b/build.sbt index 3f4644ee6..f1863588f 100644 --- a/build.sbt +++ b/build.sbt @@ -177,6 +177,7 @@ val slf4jVersion = "1.7.36" val compileAndTest = "compile->compile;test->test" lazy val loomProjects: Seq[String] = Seq(ox, examples, zioJson).flatMap(_.projectRefs).flatMap(projectId) +lazy val zioProjects: Seq[String] = Seq(zioJson).flatMap(_.projectRefs).flatMap(projectId) def projectId(projectRef: ProjectReference): Option[String] = projectRef match { @@ -193,15 +194,24 @@ lazy val allAggregates: Seq[ProjectReference] = { println("[info] STTP_NATIVE *not* defined, *not* including native in the aggregate projects") rawAllAggregates.filterNot(_.toString.contains("Native")) } + + val filteredByZio = if (sys.env.isDefinedAt("WITH_ZIO")) { + println("[info] WITH_ZIO defined, including zio projects in the aggregate projects") + filteredByNative + } else { + println("[info] WITH_ZIO *not* defined, *not* including zio-json in the aggregate projects") + filteredByNative.filterNot(p => projectId(p).forall(zioProjects.contains)) + } + if (sys.env.isDefinedAt("ONLY_LOOM")) { println("[info] ONLY_LOOM defined, including only loom-based projects") - filteredByNative.filter(p => projectId(p).forall(loomProjects.contains)) + filteredByZio.filter(p => projectId(p).forall(loomProjects.contains)) } else if (sys.env.isDefinedAt("ALSO_LOOM")) { println("[info] ALSO_LOOM defined, including also loom-based projects") - filteredByNative + filteredByZio } else { println("[info] ONLY_LOOM *not* defined, *not* including loom-based-projects") - filteredByNative.filterNot(p => projectId(p).forall(loomProjects.contains)) + filteredByZio.filterNot(p => projectId(p).forall(loomProjects.contains)) } } @@ -799,6 +809,7 @@ lazy val zioJson = (projectMatrix in file("json/zio-json")) settings = commonJvmSettings ) .jsPlatform(scalaVersions = scala2And3, settings = commonJsSettings) + .nativePlatform(scalaVersions = scala2And3, settings = commonNativeSettings) .dependsOn(core, jsonCommon % compileAndTest) lazy val zio1Json = (projectMatrix in file("json/zio1-json"))