Skip to content

Commit

Permalink
Merge branch 'master' into update/scala-library-2.13.5
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrf committed Apr 29, 2021
2 parents cfb4cfc + 7718752 commit d79a055
Show file tree
Hide file tree
Showing 16 changed files with 97 additions and 98 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
with:
java-version: adopt@1.11
- run: npm install jsdom@12.2.0
- run: sbt ++2.12.12 coverage test coverageReport coverageAggregate
- run: bash <(curl -s https://codecov.io/bash)
- run: sbt ++2.12.13 test

test213:
name: Test (Scala 2.13)
Expand All @@ -34,7 +33,8 @@ jobs:
java-version: adopt@1.11
- run: npm install jsdom@12.2.0
- run: sudo apt-get install graphviz
- run: sbt ++2.13.5 test manual/makeSite
- run: sbt ++2.13.5 coverage test coverageReport coverageAggregate manual/makeSite
- run: bash <(curl -s https://codecov.io/bash)

test3:
name: Test (Scala 3)
Expand All @@ -45,7 +45,7 @@ jobs:
- uses: olafurpg/setup-scala@v10
with:
java-version: adopt@1.11
- run: sbt "++ 3.0.0-RC1 ;json-schemaJVM/compile;algebraJVM/compile;openapiJVM/compile;http4s-server/compile;http4s-client/compile;play-server/compile;play-client/compile;akka-http-server/compile;akka-http-client/compile"
- run: sbt "++ 3.0.0-RC3 ;json-schemaJVM/compile;algebraJVM/compile;openapiJVM/compile;http4s-server/compile;http4s-client/compile;play-server/compile;play-client/compile;akka-http-server/compile;akka-http-client/compile"

versionPolicy:
name: Check versioning policy and code style
Expand Down
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ $ sbt test
Or, for a specific Scala version:

~~~ sh
<<<<<<< HEAD
$ sbt "++ 2.12.11 test"
$ sbt "++ 2.13.5 test"
=======
$ sbt "++ 2.12.13 test"
$ sbt "++ 2.13.2 test"
>>>>>>> master
~~~

### Format source code
Expand Down Expand Up @@ -81,7 +86,7 @@ After generating intellij project you may need to navigate to Settings -> Langua
`1.0.1`, `1.1.0`, or `2.0.0`, according to the compatibility guarantees of the module)
2. Run the following command:
~~~ sh
$ sbt versionCheck "++ 2.12.12 publishSigned" "++ 2.13.5 publishSigned" sonatypeReleaseAll "++ 2.13.5 manual/makeSite" manual/ghpagesPushSite
$ sbt versionCheck "++ 2.12.13 publishSigned" "++ 2.13.5 publishSigned" sonatypeReleaseAll "++ 2.13.5 manual/makeSite" manual/ghpagesPushSite
~~~
3. Reset the compatibility intention to `Compatibility.BinaryAndSourceCompatible`,
and add a `+n` suffix to the version of every module (e.g., change `1.0.0`
Expand Down
24 changes: 12 additions & 12 deletions akka-http/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ val `akka-http-client` =
version := "3.0.0+n",
versionPolicyIntention := Compatibility.BinaryAndSourceCompatible,
libraryDependencies ++= Seq(
("com.typesafe.akka" %% "akka-stream" % akkaActorVersion).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-http" % akkaHttpVersion).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-stream-testkit" % akkaActorVersion % Test).withDottyCompat(scalaVersion.value),
scalaTestDependency.withDottyCompat(scalaVersion.value)
("com.typesafe.akka" %% "akka-stream" % akkaActorVersion).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-http" % akkaHttpVersion).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-stream-testkit" % akkaActorVersion % Test).cross(CrossVersion.for3Use2_13),
scalaTestDependency.cross(CrossVersion.for3Use2_13)
)
)
.dependsOn(`algebra-jvm` % "test->test;compile->compile")
Expand All @@ -40,13 +40,13 @@ val `akka-http-server` =
version := "4.0.0+n",
versionPolicyIntention := Compatibility.BinaryAndSourceCompatible,
libraryDependencies ++= Seq(
("com.typesafe.akka" %% "akka-http" % akkaHttpVersion).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-stream" % akkaActorVersion).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-stream-testkit" % akkaActorVersion % Test).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-testkit" % akkaActorVersion % Test).withDottyCompat(scalaVersion.value),
("com.softwaremill.sttp.client" %% "core" % sttpVersion % Test).withDottyCompat(scalaVersion.value), // Temporary
scalaTestDependency.withDottyCompat(scalaVersion.value)
("com.typesafe.akka" %% "akka-http" % akkaHttpVersion).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-stream" % akkaActorVersion).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-stream-testkit" % akkaActorVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-testkit" % akkaActorVersion % Test).cross(CrossVersion.for3Use2_13),
("com.softwaremill.sttp.client" %% "core" % sttpVersion % Test).cross(CrossVersion.for3Use2_13), // Temporary
scalaTestDependency.cross(CrossVersion.for3Use2_13)
)
)
.dependsOn(`algebra-jvm` % "test->test;compile->compile", `openapi-jvm`)
Expand Down
16 changes: 8 additions & 8 deletions algebras/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ val algebra =
name := "algebra",
libraryDependencies ++= Seq(
"com.github.tomakehurst" % "wiremock" % "2.26.1" % Test,
("org.scalatest" %%% "scalatest" % scalaTestVersion % Test).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-http" % akkaHttpVersion % Test).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-actor" % akkaActorVersion % Test).withDottyCompat(scalaVersion.value),
("com.typesafe.akka" %% "akka-stream" % akkaActorVersion % Test).withDottyCompat(scalaVersion.value),
("com.lihaoyi" %% "ujson" % ujsonVersion % Test).withDottyCompat(scalaVersion.value)
("org.scalatest" %%% "scalatest" % scalaTestVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-http" % akkaHttpVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-actor" % akkaActorVersion % Test).cross(CrossVersion.for3Use2_13),
("com.typesafe.akka" %% "akka-stream" % akkaActorVersion % Test).cross(CrossVersion.for3Use2_13),
("com.lihaoyi" %% "ujson" % ujsonVersion % Test).cross(CrossVersion.for3Use2_13)
)
)
.dependsOnLocalCrossProjectsWithScope(
Expand All @@ -36,8 +36,8 @@ val `algebra-circe` =
`scala 2.12 to dotty`,
name := "algebra-circe",
libraryDependencies ++= Seq(
("io.circe" %%% "circe-parser" % circeVersion).withDottyCompat(scalaVersion.value),
("io.circe" %%% "circe-generic" % circeVersion % Test).withDottyCompat(scalaVersion.value)
("io.circe" %%% "circe-parser" % circeVersion).cross(CrossVersion.for3Use2_13),
("io.circe" %%% "circe-generic" % circeVersion % Test).cross(CrossVersion.for3Use2_13)
)
)
.dependsOn(`algebra` % "test->test;compile->compile")
Expand All @@ -54,7 +54,7 @@ val `algebra-playjson` =
publishSettings,
`scala 2.12 to dotty`,
name := "algebra-playjson",
libraryDependencies += ("com.typesafe.play" %%% "play-json" % playjsonVersion).withDottyCompat(scalaVersion.value)
libraryDependencies += ("com.typesafe.play" %%% "play-json" % playjsonVersion).cross(CrossVersion.for3Use2_13)
)
.dependsOn(`algebra` % "test->test;compile->compile")
.jsConfigure(_.disablePlugins(ScoverageSbtPlugin))
Expand Down
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ val documentation =

noPublishSettings

ivyLoggingLevel in ThisBuild := UpdateLogging.Quiet
ThisBuild / ivyLoggingLevel := UpdateLogging.Quiet

publishTo in ThisBuild := sonatypePublishTo.value
ThisBuild / publishTo := sonatypePublishTo.value

Global / onChangedBuildSource := ReloadOnSourceChanges

Expand All @@ -32,8 +32,6 @@ ThisBuild / sonatypeProjectHosting := Some(
GitHubHosting("endpoints4s", "endpoints4s", "julien@richard-foy.fr")
)

ThisBuild / versionScheme := Some("early-semver")

// Default intention: binary compatibility between releases.
// We want to keep binary compatibility as long as we can for the algebra,
// but it is OK to publish breaking releases of interpreters. So,
Expand All @@ -58,5 +56,5 @@ val versionSchemes = Def.setting {
}

ThisBuild / evictionRules ++= versionSchemes.value
ThisBuild / versionPolicyDependencyRules ++= versionSchemes.value
ThisBuild / versionPolicyDependencySchemes ++= versionSchemes.value
ThisBuild / versionPolicyIgnored += "joda-time" % "joda-time"
52 changes: 26 additions & 26 deletions documentation/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ val apiDoc =
noPublishSettings,
`scala 2.13`,
coverageEnabled := false,
scalacOptions in (ScalaUnidoc, unidoc) ++= Seq(
ScalaUnidoc / unidoc / scalacOptions ++= Seq(
"-implicits",
"-diagrams",
"-groups",
"-doc-source-url",
s"https://github.com/endpoints4s/endpoints4s/blob/v${version.value}€{FILE_PATH}.scala",
"-sourcepath",
(baseDirectory in ThisBuild).value.absolutePath
(ThisBuild / baseDirectory).value.absolutePath
),
unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(
ScalaUnidoc / unidoc / unidocProjectFilter := inProjects(
`algebra-jvm`,
`algebra-circe-jvm`,
`algebra-playjson-jvm`,
Expand Down Expand Up @@ -162,7 +162,7 @@ val `example-quickstart-server` =
noPublishSettings,
`scala 2.12 to 2.13`,
libraryDependencies ++= Seq(
"org.scala-stm" %% "scala-stm" % "0.11.0",
"org.scala-stm" %% "scala-stm" % "0.11.1",
scalaTestDependency
)
)
Expand All @@ -183,10 +183,10 @@ val `example-basic-shared` = {
noPublishSettings,
`scala 2.12 to 2.13`,
macroParadiseDependency,
(sourceGenerators in Compile) += Def.task {
Compile / sourceGenerators += Def.task {
assets.AssetsTasks.generateDigests(
baseDirectory = baseDirectory.value.getParentFile,
targetDirectory = (sourceManaged in Compile).value,
targetDirectory = (Compile / sourceManaged).value,
generatedObjectName = "AssetsDigests",
generatedPackage = Some("sample")
)
Expand All @@ -196,13 +196,13 @@ val `example-basic-shared` = {
.jsConfigure(_.disablePlugins(ScoverageSbtPlugin))
.jvmSettings(
coverageEnabled := false, // TODO Enable coverage when we add more tests
(resourceGenerators in Compile) += Def.task {
Compile / resourceGenerators += Def.task {
assets.AssetsTasks.gzipAssets(
baseDirectory = baseDirectory.value.getParentFile,
targetDirectory = (target in Compile).value
targetDirectory = (Compile / target).value
)
}.taskValue,
unmanagedResourceDirectories in Compile += assetsDirectory(
Compile / unmanagedResourceDirectories += assetsDirectory(
baseDirectory.value.getParentFile
)
)
Expand All @@ -222,7 +222,7 @@ val `example-basic-client` =
noPublishSettings,
`scala 2.12 to 2.13`,
scalaJSUseMainModuleInitializer := true,
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.2.0"
libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % "2.2.2"
)
.dependsOn(`example-basic-shared-js`, `xhr-client-circe`)

Expand All @@ -232,7 +232,7 @@ val `example-basic-play-server` =
.settings(
noPublishSettings,
`scala 2.12 to 2.13`,
unmanagedResources in Compile += (fastOptJS in (`example-basic-client`, Compile))
Compile / unmanagedResources += (`example-basic-client` / Compile / fastOptJS)
.map(_.data)
.value,
libraryDependencies += "org.slf4j" % "slf4j-simple" % "1.7.30",
Expand Down Expand Up @@ -268,7 +268,7 @@ val `example-cqrs-public-endpoints` =
.settings(
libraryDependencies ++= Seq(
"io.circe" %%% "circe-generic" % circeVersion,
"io.github.cquiroz" %%% "scala-java-time" % "2.2.0"
"io.github.cquiroz" %%% "scala-java-time" % "2.2.2"
)
)
.dependsOnLocalCrossProjects("json-schema-generic", "algebra-circe")
Expand All @@ -286,9 +286,9 @@ val `example-cqrs-web-client` =
noPublishSettings,
`scala 2.12 to 2.13`,
libraryDependencies ++= Seq(
"com.raquo" %%% "laminar" % "0.12.1",
"com.raquo" %%% "laminar" % "0.12.2",
"org.julienrf" %%% "faithful-cats" % "2.0.0",
"io.github.cquiroz" %%% "scala-java-time" % "2.2.0"
"io.github.cquiroz" %%% "scala-java-time" % "2.2.2"
),
scalaJSUseMainModuleInitializer := true
)
Expand All @@ -302,21 +302,21 @@ val `example-cqrs-public-server` =
.settings(
noPublishSettings,
`scala 2.12 to 2.13`,
unmanagedResources in Compile += (fastOptJS in (`example-cqrs-web-client`, Compile))
Compile / unmanagedResources += (`example-cqrs-web-client` / Compile / fastOptJS)
.map(_.data)
.value,
(sourceGenerators in Compile) += Def
Compile / sourceGenerators += Def
.task {
assets.AssetsTasks.generateDigests(
baseDirectory =
(crossTarget in fastOptJS in `example-cqrs-web-client`).value,
targetDirectory = (sourceManaged in Compile).value,
(`example-cqrs-web-client` / fastOptJS / crossTarget).value,
targetDirectory = (Compile / sourceManaged).value,
generatedObjectName = "BootstrapDigests",
generatedPackage = Some("cqrs.publicserver"),
assetsPath = identity
)
}
.dependsOn(fastOptJS in Compile in `example-cqrs-web-client`)
.dependsOn(`example-cqrs-web-client` / Compile / fastOptJS)
.taskValue
)
.dependsOn(`play-server-circe`, `play-client`, `openapi-jvm`)
Expand All @@ -334,7 +334,7 @@ lazy val `example-cqrs-commands-endpoints` =
noPublishSettings,
`scala 2.12 to 2.13`,
libraryDependencies ++= Seq(
"org.scala-stm" %% "scala-stm" % "0.11.0",
"org.scala-stm" %% "scala-stm" % "0.11.1",
"io.circe" %% "circe-generic" % circeVersion
)
)
Expand Down Expand Up @@ -382,7 +382,7 @@ val `example-cqrs` =
.in(file("examples/cqrs/infra"))
.settings(noPublishSettings, `scala 2.12 to 2.13`)
.settings(
cancelable in Global := true,
Global / cancelable := true,
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.15.3" % Test,
scalaTestDependency
Expand All @@ -409,19 +409,19 @@ val `example-documented` =
// .get
// .toString)
// ),
assemblyMergeStrategy in assembly := {
assembly / assemblyMergeStrategy := {
case x if x.endsWith("io.netty.versions.properties") =>
MergeStrategy.first
case x if x.endsWith("module-info.class") =>
MergeStrategy.first
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
},
(sourceGenerators in Compile) += Def.task {
Compile / sourceGenerators += Def.task {
assets.AssetsTasks.generateDigests(
baseDirectory = baseDirectory.value,
targetDirectory = (sourceManaged in Compile).value,
targetDirectory = (Compile / sourceManaged).value,
generatedObjectName = "AssetsDigests",
generatedPackage = Some("counter"),
assetsPath = _ / "src" / "main" / "resources" / "public"
Expand All @@ -436,7 +436,7 @@ val `example-authentication` =
.settings(noPublishSettings, `scala 2.12 to 2.13`)
.settings(
libraryDependencies ++= Seq(
"com.github.jwt-scala" %% "jwt-play" % "7.0.0",
"com.github.jwt-scala" %% "jwt-play" % "7.1.3",
scalaTestDependency
)
)
Expand Down
10 changes: 5 additions & 5 deletions http4s/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ val `http4s-server` =
version := "6.0.0",
versionPolicyIntention := Compatibility.None,
libraryDependencies ++= Seq(
("org.http4s" %% "http4s-core" % http4sVersion).withDottyCompat(scalaVersion.value),
("org.http4s" %% "http4s-dsl" % http4sVersion).withDottyCompat(scalaVersion.value),
("org.http4s" %% "http4s-blaze-server" % http4sVersion % Test).withDottyCompat(scalaVersion.value)
("org.http4s" %% "http4s-core" % http4sVersion).cross(CrossVersion.for3Use2_13),
("org.http4s" %% "http4s-dsl" % http4sVersion).cross(CrossVersion.for3Use2_13),
("org.http4s" %% "http4s-blaze-server" % http4sVersion % Test).cross(CrossVersion.for3Use2_13)
)
)
.dependsOn(`algebra-jvm` % "test->test;compile->compile")
Expand All @@ -33,8 +33,8 @@ val `http4s-client` =
version := "3.0.0+n",
versionPolicyIntention := Compatibility.BinaryAndSourceCompatible,
libraryDependencies ++= Seq(
("org.http4s" %% "http4s-client" % http4sVersion).withDottyCompat(scalaVersion.value),
("org.http4s" %% "http4s-async-http-client" % http4sVersion % Test).withDottyCompat(scalaVersion.value)
("org.http4s" %% "http4s-client" % http4sVersion).cross(CrossVersion.for3Use2_13),
("org.http4s" %% "http4s-async-http-client" % http4sVersion % Test).cross(CrossVersion.for3Use2_13)
)
)
.dependsOn(`algebra-jvm` % "test->test;compile->compile")
Expand Down

0 comments on commit d79a055

Please sign in to comment.