Skip to content

Commit

Permalink
Merge pull request #70 from tethys-json/build-upd
Browse files Browse the repository at this point in the history
Update Scala and dependencies version, drop Scala 2.11 support
  • Loading branch information
REDNBLACK committed Jan 23, 2021
2 parents 1245f44 + 6edaa36 commit 122d77d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v5.13.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
scala: [2.11.12, 2.12.12, 2.13.3]
scala: [2.12.13, 2.13.4]

steps:
- uses: actions/checkout@v2
Expand All @@ -36,9 +36,9 @@ jobs:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}

- uses: olafurpg/setup-scala@v5
- uses: olafurpg/setup-scala@v10
with:
java-version: graalvm@20.0.0
java-version: graalvm@21.0.0=tgz+https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.0.0/graalvm-ce-java11-linux-amd64-21.0.0.tar.gz

- name: Test
run: sbt ++${{matrix.scala}} test
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tethys is a JSON parsing/writing library for Scala
Add dependencies to your `build.sbt`

```scala
val tethysVersion = "0.11.0"
val tethysVersion = "latest version in badge"
libraryDependencies ++= Seq(
"com.tethys-json" %% "tethys-core" % tethysVersion,
"com.tethys-json" %% "tethys-jackson" % tethysVersion,
Expand All @@ -26,7 +26,7 @@ or just

```scala
libraryDependecies ++= Seq(
"com.tethys-json" %% "tethys" % "0.11.0"
"com.tethys-json" %% "tethys" % "latest version in badge"
)
```

Expand Down
63 changes: 22 additions & 41 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
lazy val commonSettings = Seq(
version := "0.11.0",
version := "0.20.0",
organization := "com.tethys-json",
scalaVersion := "2.11.12",
crossScalaVersions := Seq("2.11.12", "2.12.12", "2.13.3"),
scalaVersion := "2.12.13",
crossScalaVersions := Seq("2.12.13", "2.13.4"),
Compile / unmanagedSourceDirectories ++= {
def extraDirs(suffix: String) = Seq(file(sourceDirectory.value.getPath + "/main/scala" + suffix))

Expand Down Expand Up @@ -32,25 +32,24 @@ lazy val commonSettings = Seq(
Developer(
id = "REDNBLACK",
name = "Boris Potepun",
email = "boris@f0w.org",
email = "boris[email protected]",
url = url("https://github.com/REDNBLACK")
)
),
publishMavenStyle := true,
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
Some(Opts.resolver.sonatypeSnapshots)
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
sonatypePublishToBundle.value
},
publishArtifact in Test := false
)

lazy val testSettings = Seq(
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest-flatspec" % "3.2.2" % Test,
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.2" % Test
"org.scalatest" %% "scalatest-flatspec" % "3.2.3" % Test,
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.3" % Test
)
)

Expand Down Expand Up @@ -94,7 +93,7 @@ lazy val `jackson-backend` = project.in(modules / "jackson-backend")
.settings(
name := "tethys-jackson",
libraryDependencies ++= Seq(
"com.fasterxml.jackson.core" % "jackson-core" % "2.11.2"
"com.fasterxml.jackson.core" % "jackson-core" % "2.12.1"
)
)
.dependsOn(core)
Expand All @@ -104,14 +103,9 @@ lazy val circe = project.in(modules / "circe")
.settings(testSettings)
.settings(
name := "tethys-circe",
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 11)) =>
Seq("io.circe" %% "circe-core" % "0.12.0-M3")
case _ =>
Seq("io.circe" %% "circe-core" % "0.13.0")
}
}
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % "0.13.0"
)
)
.dependsOn(core, `jackson-backend` % Test)

Expand All @@ -121,7 +115,7 @@ lazy val json4s = project.in(modules / "json4s")
.settings(
name := "tethys-json4s",
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-core" % "3.6.9"
"org.json4s" %% "json4s-core" % "3.6.10"
)
)
.dependsOn(core)
Expand All @@ -142,29 +136,16 @@ lazy val benchmarks = project.in(modules / "benchmarks")
.settings(
publishTo := None,
libraryDependencies ++= Seq(
"io.spray" %% "spray-json" % "1.3.5",
"org.json4s" %% "json4s-native" % "3.6.9",
"org.json4s" %% "json4s-jackson" % "3.6.9",
"org.knowm.xchart" % "xchart" % "3.6.5" exclude("de.erichseifert.vectorgraphics2d", "VectorGraphics2D") withSources()
"io.spray" %% "spray-json" % "1.3.6",
"org.json4s" %% "json4s-native" % "3.6.10",
"org.json4s" %% "json4s-jackson" % "3.6.10",
"io.circe" %% "circe-core" % "0.13.0",
"io.circe" %% "circe-generic" % "0.13.0",
"io.circe" %% "circe-jawn" % "0.13.0",
"io.circe" %% "circe-jackson210" % "0.13.0",
"com.typesafe.play" %% "play-json" % "2.9.2",
"org.knowm.xchart" % "xchart" % "3.8.0" exclude("de.erichseifert.vectorgraphics2d", "VectorGraphics2D") withSources()
),
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq(
"io.circe" %% "circe-core" % "0.13.0",
"io.circe" %% "circe-generic" % "0.13.0",
"io.circe" %% "circe-jawn" % "0.13.0",
"io.circe" %% "circe-jackson210" % "0.13.0",
"com.typesafe.play" %% "play-json" % "2.9.1"
)
case _ => Seq(
"io.circe" %% "circe-core" % "0.12.0-M3",
"io.circe" %% "circe-generic" % "0.12.0-M3",
"io.circe" %% "circe-jawn" % "0.12.0-M3",
"io.circe" %% "circe-jackson210" % "0.11.2",
"com.typesafe.play" %% "play-json" % "2.7.4"
)
}
},
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Nil
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.3.13
sbt.version = 1.4.6
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.4")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")

0 comments on commit 122d77d

Please sign in to comment.