From 6edaa3669c0f7274b096f9cd0f8f280c7609d3d5 Mon Sep 17 00:00:00 2001 From: REDNBLACK Date: Sun, 24 Jan 2021 01:27:16 +0300 Subject: [PATCH] Update Scala and dependencies version, drop Scala 2.11 support --- .github/workflows/release-drafter.yml | 2 +- .github/workflows/scala.yml | 6 +-- README.md | 4 +- build.sbt | 63 ++++++++++----------------- project/build.properties | 2 +- project/plugins.sbt | 2 +- 6 files changed, 30 insertions(+), 49 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 2c30bcdb..6ef7180a 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -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 }} diff --git a/.github/workflows/scala.yml b/.github/workflows/scala.yml index 7e8b8519..2cc8c856 100644 --- a/.github/workflows/scala.yml +++ b/.github/workflows/scala.yml @@ -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 @@ -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 diff --git a/README.md b/README.md index 4a3d5bcd..4ca1ea25 100644 --- a/README.md +++ b/README.md @@ -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, @@ -26,7 +26,7 @@ or just ```scala libraryDependecies ++= Seq( - "com.tethys-json" %% "tethys" % "0.11.0" + "com.tethys-json" %% "tethys" % "latest version in badge" ) ``` diff --git a/build.sbt b/build.sbt index 82b3884a..672a083f 100644 --- a/build.sbt +++ b/build.sbt @@ -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)) @@ -32,25 +32,24 @@ lazy val commonSettings = Seq( Developer( id = "REDNBLACK", name = "Boris Potepun", - email = "boris@f0w.org", + email = "boris.p@protonmail.com", 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 ) ) @@ -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) @@ -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) @@ -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) @@ -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 diff --git a/project/build.properties b/project/build.properties index cb6a5a8a..daac5dbf 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.3.13 +sbt.version = 1.4.6 diff --git a/project/plugins.sbt b/project/plugins.sbt index c1fd9fd5..a2189f70 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -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")