Skip to content

Commit

Permalink
Remove redundant dependencies for runtime (#1261)
Browse files Browse the repository at this point in the history
  • Loading branch information
plokhotnyuk authored Jan 29, 2025
1 parent 796ad55 commit 76d9c8f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
16 changes: 9 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
libraryDependencies ++= Seq(
"dev.zio" %%% "zio" % zioVersion,
"dev.zio" %%% "zio-streams" % zioVersion,
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.12.0",
"org.scala-lang.modules" %%% "scala-collection-compat" % "2.13.0" % "test",
"dev.zio" %%% "zio-test" % zioVersion % "test",
"dev.zio" %%% "zio-test-sbt" % zioVersion % "test",
"com.github.plokhotnyuk.jsoniter-scala" %%% "jsoniter-scala-core" % "2.33.0" % "test",
Expand Down Expand Up @@ -220,13 +220,14 @@ lazy val zioJson = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.jsSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion,
"io.github.cquiroz" %%% "scala-java-time-tzdb" % scalaJavaTimeVersion
"io.github.cquiroz" %%% "scala-java-time-tzdb" % scalaJavaTimeVersion % "test"
)
)
.nativeSettings(nativeSettings)
.nativeSettings(
libraryDependencies ++= Seq(
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion
"io.github.cquiroz" %%% "scala-java-time" % scalaJavaTimeVersion,
"io.github.cquiroz" %%% "scala-java-time-tzdb" % scalaJavaTimeVersion % "test"
)
)
.enablePlugins(BuildInfoPlugin)
Expand Down Expand Up @@ -262,10 +263,11 @@ lazy val zioJsonYaml = project
.settings(buildInfoSettings("zio.json.yaml"))
.settings(
libraryDependencies ++= Seq(
"org.yaml" % "snakeyaml" % "2.3",
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test"
"org.yaml" % "snakeyaml" % "2.3",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.13.0",
"dev.zio" %% "zio" % zioVersion,
"dev.zio" %% "zio-test" % zioVersion % "test",
"dev.zio" %% "zio-test-sbt" % zioVersion % "test"
),
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
)
Expand Down
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ In order to use this library, we need to add the following line in our `build.sb
libraryDependencies += "dev.zio" %% "zio-json" % "@VERSION@"
```

For cross-platform projects with Scala.js and Scala Native need to replace `%%` operator by `%%%`,
and optionally when using `java.time.ZoneId` and `java.time.ZonedDateTime` types need to add
the dependency on the latest version of Timezone DB:

```scala
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time-tzdb" % "latest.integration"
```

## Example

Let's try a simple example of encoding and decoding JSON using ZIO JSON.
Expand Down

0 comments on commit 76d9c8f

Please sign in to comment.