Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala 3 cross-compile with removed serialization and rhttpc-akka-persistence modules #28

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ jobs:
build:
working_directory: ~/arkadius/reliable-http-client
docker:
- image: openjdk:8
- image: openjdk:11
environment:
SBT_VERSION: 1.5.1
SBT_VERSION: 1.10.7
DOCKER_VERSION: 18.06.3-ce
TESTCONTAINERS_RYUK_DISABLED: "true"
steps:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ libraryDependencies += "org.rhttpc" %% "rhttpc-json4s" % "0.9.0"

Then:
```scala
import akka.actor._
import org.apache.pekko.actor._
import rhttpc.transport.amqp._
import rhttpc.transport.json4s._
import rhttpc.transport.json4s.CommonFormats._
Expand Down Expand Up @@ -61,7 +61,7 @@ libraryDependencies += "org.rhttpc" %% "rhttpc-client" % "0.9.0"
### In-only scenario

```scala
import akka.actor._
import org.apache.pekko.actor._
import rhttpc.transport.amqp._
import rhttpc.transport.json4s._
import rhttpc.transport.json4s.CommonFormats._
Expand All @@ -78,7 +78,7 @@ AmqpConnectionFactory.connect(actorSystem).map { implicit connection =>
### In-out with stateless consumer

```scala
import akka.actor._
import org.apache.pekko.actor._
import rhttpc.transport.amqp._
import rhttpc.transport.json4s._
import rhttpc.transport.json4s.CommonFormats._
Expand Down
155 changes: 29 additions & 126 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import com.typesafe.sbt.packager.docker.DockerPlugin.autoImport._
import sbt.Keys._
import ReleaseTransformations._

val defaultScalaVersion = "2.13.6"
val scalaVersions = Seq("2.12.13", defaultScalaVersion)
val defaultScalaVersion = "3.3.5"
val scalaVersions = Seq("2.13.16", defaultScalaVersion)

val commonSettings =
Seq(
Expand Down Expand Up @@ -37,15 +37,11 @@ val commonSettings =
headerEmptyLine := false,
homepage := Some(url("https://github.com/arkadius/reliable-http-client")),
dockerRepository := Some("arkadius"),
dockerBaseImage := "openjdk:8",
dockerBaseImage := "openjdk:11",
resolvers ++= Seq(
"Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository",
Resolver.jcenterRepo
),
ThisBuild / libraryDependencies ++= Seq(
compilerPlugin("com.github.ghik" % "silencer-plugin" % "1.7.5" cross CrossVersion.full),
"com.github.ghik" % "silencer-lib" % "1.7.5" % Provided cross CrossVersion.full
)
)

val publishSettings = Seq(
Expand Down Expand Up @@ -74,25 +70,22 @@ val publishSettings = Seq(
}
)

val akkaV = "2.6.18"
val akkaHttpV = "10.2.6"
val pekkoV = "1.1.3"
val pekkoHttpV = "1.1.0"
val amqpcV = "3.6.6"
val argonaut62MinorV = ".3"
val betterFilesV = "3.9.1"
val commonsIoV = "2.5"
val dispatchV = "1.2.0"
val ficusV = "1.4.7"
val betterFilesV = "3.9.2"
val commonsIoV = "2.18.0"
val dispatchV = "2.0.0"
val ficusV = "1.5.2"
val flywayV = "6.2.4"
val hsqldbV = "2.3.6"
val json4sV = "3.6.11"
val hsqldbV = "2.7.4"
val jaxbV = "2.3.1"
val logbackV = "1.1.11"
val scalaCompatV = "2.4.4"
val scalaTestV = "3.2.9"
val slf4jV = "1.7.26"
val slickV = "3.3.2"
val logbackV = "1.5.16"
val scalaTestV = "3.2.19"
val slf4jV = "1.7.36"
val slickV = "3.5.2"
val scalaStmV = "0.11.1"
val testContainersV = "0.39.5"
val testContainersV = "0.41.8"

lazy val transport = (project in file("rhttpc-transport")).
settings(commonSettings).
Expand All @@ -101,7 +94,7 @@ lazy val transport = (project in file("rhttpc-transport")).
name := "rhttpc-transport",
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-actor" % akkaV,
"org.apache.pekko" %% "pekko-actor" % pekkoV,
"org.slf4j" % "slf4j-api" % slf4jV,
"org.scala-stm" %% "scala-stm" % scalaStmV,
"org.scalatest" %% "scalatest" % scalaTestV % "test"
Expand All @@ -116,9 +109,9 @@ lazy val inMemTransport = (project in file("rhttpc-inmem")).
name := "rhttpc-inmem",
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-testkit" % akkaV % "test",
"org.apache.pekko" %% "pekko-testkit" % pekkoV % "test",
"org.scalatest" %% "scalatest" % scalaTestV % "test",
"com.typesafe.akka" %% "akka-slf4j" % akkaV % "test",
"org.apache.pekko" %% "pekko-slf4j" % pekkoV % "test",
"ch.qos.logback" % "logback-classic" % logbackV % "test"
)
}
Expand All @@ -132,18 +125,16 @@ lazy val amqpTransport = (project in file("rhttpc-amqp")).
name := "rhttpc-amqp",
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-stream" % akkaV,
"org.apache.pekko" %% "pekko-stream" % pekkoV,
"com.rabbitmq" % "amqp-client" % amqpcV,
"com.iheart" %% "ficus" % ficusV,
"org.scala-lang.modules" %% "scala-collection-compat" % scalaCompatV,
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"com.typesafe.akka" %% "akka-testkit" % akkaV % "test",
"org.apache.pekko" %% "pekko-testkit" % pekkoV % "test",
"org.scalatest" %% "scalatest" % scalaTestV % "test",

"org.dispatchhttp" %% "dispatch-core" % dispatchV % "test",
"com.typesafe.akka" %% "akka-slf4j" % akkaV % "test",
"org.apache.pekko" %% "pekko-slf4j" % pekkoV % "test",
"ch.qos.logback" % "logback-classic" % logbackV % "test",
"com.typesafe.akka" %% "akka-http" % akkaHttpV % "test"
"org.apache.pekko" %% "pekko-http" % pekkoHttpV % "test"
)
}
).
Expand All @@ -167,34 +158,6 @@ lazy val amqpJdbcTransport = (project in file("rhttpc-amqp-jdbc")).
).
dependsOn(amqpTransport)

lazy val json4sSerialization = (project in file("rhttpc-json4s")).
settings(commonSettings).
settings(publishSettings).
settings(
name := "rhttpc-json4s",
libraryDependencies ++= {
Seq(
"org.json4s" %% "json4s-native" % json4sV,
"org.scala-lang" % "scala-reflect" % scalaVersion.value,
"org.scalatest" %% "scalatest" % scalaTestV % "test"
)
}
).
dependsOn(transport)

lazy val argonaut62Serialization = (project in file("rhttpc-argonaut_6.2")).
settings(commonSettings).
settings(publishSettings).
settings(
name := "rhttpc-argonaut_6.2",
libraryDependencies ++= {
Seq(
"io.argonaut" %% "argonaut" % s"6.2$argonaut62MinorV"
)
}
).
dependsOn(transport)

lazy val client = (project in file("rhttpc-client")).
settings(commonSettings).
settings(publishSettings).
Expand All @@ -203,58 +166,26 @@ lazy val client = (project in file("rhttpc-client")).
libraryDependencies ++= {
Seq(
"com.iheart" %% "ficus" % ficusV,
"com.typesafe.akka" %% "akka-testkit" % akkaV % "test",
"org.apache.pekko" %% "pekko-testkit" % pekkoV % "test",
"org.scalatest" %% "scalatest" % scalaTestV % "test",
"com.typesafe.akka" %% "akka-slf4j" % akkaV % "test",
"org.apache.pekko" %% "pekko-slf4j" % pekkoV % "test",
"ch.qos.logback" % "logback-classic" % logbackV % "test"
)
}
).
dependsOn(transport).
dependsOn(inMemTransport % "test")

lazy val akkaHttpClient = (project in file("rhttpc-akka-http")).
settings(commonSettings).
settings(publishSettings).
settings(
name := "rhttpc-akka-http",
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpV,
"org.scala-lang.modules" %% "scala-collection-compat" % scalaCompatV,
"org.scalatest" %% "scalatest" % scalaTestV % "test"
)
}
).
dependsOn(client).
dependsOn(amqpTransport).
dependsOn(json4sSerialization).
dependsOn(inMemTransport)

lazy val akkaPersistence = (project in file("rhttpc-akka-persistence")).
settings(commonSettings).
settings(publishSettings).
settings(
name := "rhttpc-akka-persistence",
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-persistence" % akkaV
)
}
).
dependsOn(client % "compile->compile;test->test").
dependsOn(json4sSerialization)

lazy val sampleEcho = (project in file("sample/sample-echo")).
settings(commonSettings).
enablePlugins(DockerPlugin).
enablePlugins(JavaAppPackaging).
settings(
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpV,
"com.typesafe.akka" %% "akka-slf4j" % akkaV,
"com.typesafe.akka" %% "akka-stream" % akkaV,
"org.apache.pekko" %% "pekko-http" % pekkoHttpV,
"org.apache.pekko" %% "pekko-slf4j" % pekkoV,
"org.apache.pekko" %% "pekko-stream" % pekkoV,
"ch.qos.logback" % "logback-classic" % logbackV,
"org.scalatest" %% "scalatest" % scalaTestV % "test"
)
Expand All @@ -264,31 +195,6 @@ lazy val sampleEcho = (project in file("sample/sample-echo")).
)
.dependsOn(transport)

lazy val sampleApp = (project in file("sample/sample-app")).
settings(commonSettings).
settings(Seq(
bashScriptExtraDefines += s"""addJava "-Dlogback.configurationFile=/etc/${name.value}/logback.xml""""
)).
enablePlugins(DockerPlugin).
enablePlugins(JavaAppPackaging).
settings(
libraryDependencies ++= {
Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpV,
"org.iq80.leveldb" % "leveldb" % "0.12",
"org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8",
"com.typesafe.akka" %% "akka-slf4j" % akkaV,
"ch.qos.logback" % "logback-classic" % logbackV,
"com.typesafe.akka" %% "akka-testkit" % akkaV % "test",
"org.scalatest" %% "scalatest" % scalaTestV % "test"
)
},
dockerExposedPorts := Seq(8081),
publish / skip := true
).
dependsOn(akkaHttpClient).
dependsOn(akkaPersistence)

lazy val testProj = (project in file("sample/test")).
settings(commonSettings).
settings(
Expand All @@ -306,18 +212,15 @@ lazy val testProj = (project in file("sample/test")).
},
Test / Keys.test := (Test / Keys.test).dependsOn(
sampleEcho / Docker / publishLocal,
sampleApp / Docker / publishLocal
).value,
publish / skip := true
)

lazy val root = (project in file("."))
.aggregate(
transport, inMemTransport, amqpTransport, amqpJdbcTransport,
json4sSerialization, argonaut62Serialization,
client, akkaHttpClient,
akkaPersistence,
sampleEcho, sampleApp, testProj)
client,
sampleEcho, testProj)
.settings(commonSettings)
.settings(publishSettings)
.settings(
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.5.1
sbt.version=1.10.7
17 changes: 0 additions & 17 deletions rhttpc-akka-http/src/main/resources/reference.conf

This file was deleted.

Loading