Permalink
Browse files

MTL style behaviour algebra (#50)

  • Loading branch information...
notxcain committed Oct 31, 2018
1 parent 2083621 commit 30a5858d8e2a49e6118a7ba5dd40fa7f57e19cb2
Showing with 2,345 additions and 2,032 deletions.
  1. +2 −0 .gitignore
  2. +3 −1 .scalafmt.conf
  3. +0 −1 .travis.yml
  4. +137 −110 build.sbt
  5. +3 −0 modules/akka-cluster-runtime/src/main/resources/reference.conf
  6. +33 −32 modules/akka-cluster-runtime/src/main/scala/aecor/runtime/akkageneric/GenericAkkaRuntime.scala
  7. +44 −37 modules/akka-cluster-runtime/src/main/scala/aecor/runtime/akkageneric/GenericAkkaRuntimeActor.scala
  8. +7 −8 ...ka-cluster-runtime/src/main/scala/aecor/runtime/akkageneric/serialization/MessageSerializer.scala
  9. +23 −0 modules/akka-cluster-runtime/src/test/resources/reference.conf
  10. +34 −0 modules/akka-cluster-runtime/src/test/scala/aecor/runtime/akkageneric/Counter.scala
  11. +68 −0 modules/akka-cluster-runtime/src/test/scala/aecor/runtime/akkageneric/GenericRuntimeSpec.scala
  12. +49 −0 modules/akka-cluster-runtime/src/test/scala/aecor/runtime/akkageneric/MessageSerializerTest.scala
  13. +1 −0 modules/akka-persistence-runtime/src/main/resources/reference.conf
  14. +33 −30 ...kka-persistence-runtime/src/main/scala/aecor/runtime/akkapersistence/AkkaPersistenceRuntime.scala
  15. +55 −37 ...ersistence-runtime/src/main/scala/aecor/runtime/akkapersistence/AkkaPersistenceRuntimeActor.scala
  16. +2 −1 ...ka-persistence-runtime/src/main/scala/aecor/runtime/akkapersistence/CassandraJournalAdapter.scala
  17. +0 −1 modules/akka-persistence-runtime/src/main/scala/aecor/runtime/akkapersistence/JournalAdapter.scala
  18. +29 −12 ...sistence-runtime/src/main/scala/aecor/runtime/akkapersistence/readside/CassandraOffsetStore.scala
  19. +0 −14 ...s/akka-persistence-runtime/src/main/scala/aecor/runtime/akkapersistence/serialization/Codec.scala
  20. +12 −12 ...stence-runtime/src/main/scala/aecor/runtime/akkapersistence/serialization/MessageSerializer.scala
  21. +7 −10 ...stence-runtime/src/main/scala/aecor/runtime/akkapersistence/serialization/PersistentDecoder.scala
  22. +0 −6 ...stence-runtime/src/main/scala/aecor/runtime/akkapersistence/serialization/PersistentEncoder.scala
  23. +0 −69 ...istence-runtime/src/main/scala/akka/persistence/cassandra/CassandraSessionInitSerialization.scala
  24. +31 −0 ...ersistence-runtime/src/main/scala/akka/persistence/cassandra/DefaultJournalCassandraSession.scala
  25. +44 −0 modules/akka-persistence-runtime/src/main/scala/akka/persistence/cassandra/Session.scala
  26. +32 −0 modules/boopickle-wire-protocol/src/main/scala/aecor/macros/boopickle/BoopickleCodec.scala
  27. +19 −62 modules/boopickle-wire-protocol/src/main/scala/aecor/macros/boopickleWireProtocol.scala
  28. +0 −16 modules/core/src/main/scala/aecor/IsK.scala
  29. +142 −26 modules/core/src/main/scala/aecor/data/ActionT.scala
  30. +0 −55 modules/core/src/main/scala/aecor/data/Behavior.scala
  31. +3 −4 modules/core/src/main/scala/aecor/data/Composer.scala
  32. +87 −0 modules/core/src/main/scala/aecor/data/EitherK.scala
  33. +6 −6 modules/core/src/main/scala/aecor/data/EntityEvent.scala
  34. +4 −0 modules/core/src/main/scala/aecor/data/EventTag.scala
  35. +48 −0 modules/core/src/main/scala/aecor/data/EventsourcedBehavior.scala
  36. +0 −49 modules/core/src/main/scala/aecor/data/EventsourcedBehaviorT.scala
  37. +53 −0 modules/core/src/main/scala/aecor/data/MonadAction.scala
  38. +9 −4 modules/core/src/main/scala/aecor/data/PairE.scala
  39. +2 −0 modules/core/src/main/scala/aecor/data/Tagging.scala
  40. +0 −40 modules/core/src/main/scala/aecor/data/package.scala
  41. +8 −44 modules/core/src/main/scala/aecor/encoding/WireProtocol.scala
  42. +13 −0 modules/core/src/main/scala/aecor/encoding/syntax.scala
  43. +3 −3 modules/core/src/main/scala/aecor/runtime/EventJournal.scala
  44. +41 −122 modules/core/src/main/scala/aecor/runtime/Eventsourced.scala
  45. +12 −4 modules/core/src/main/scala/aecor/runtime/KeyValueStore.scala
  46. +1 −0 modules/core/src/main/scala/aecor/runtime/NoopKeyValueStore.scala
  47. +109 −0 modules/core/src/main/scala/aecor/runtime/eventsourced/DefaultActionRunner.scala
  48. +7 −0 modules/core/src/main/scala/aecor/runtime/eventsourced/package.scala
  49. +1 −1 modules/core/src/main/scala/aecor/util/{ClockT.scala → Clock.scala}
  50. +4 −2 modules/core/src/main/scala/aecor/util/JavaTimeClock.scala
  51. +12 −14 modules/core/src/main/scala/aecor/util/effect.scala
  52. +1 −0 modules/distributed-processing/src/main/resources/reference.conf
  53. +2 −2 modules/distributed-processing/src/main/scala/aecor/distributedprocessing/AkkaStreamProcess.scala
  54. +17 −9 ...les/distributed-processing/src/main/scala/aecor/distributedprocessing/DistributedProcessing.scala
  55. +4 −2 ...stributed-processing/src/main/scala/aecor/distributedprocessing/DistributedProcessingWorker.scala
  56. BIN modules/example/src/main/scala/aecor/.DS_Store
  57. BIN modules/example/src/main/scala/aecor/example/.DS_Store
  58. +0 −38 modules/example/src/main/scala/aecor/example/AccountEndpoint.scala
  59. +0 −4 modules/example/src/main/scala/aecor/example/AnyValCirceEncoding.scala
  60. +76 −98 modules/example/src/main/scala/aecor/example/App.scala
  61. +0 −23 modules/example/src/main/scala/aecor/example/MonixSupport.scala
  62. +82 −90 modules/example/src/main/scala/aecor/example/ScheduleApp.scala
  63. +0 −124 modules/example/src/main/scala/aecor/example/TransactionEndpoint.scala
  64. +8 −6 modules/example/src/main/scala/aecor/example/{domain → }/account/AccountEvent.scala
  65. +1 −1 modules/example/src/main/scala/aecor/example/{domain → }/account/AccountId.scala
  66. +39 −0 modules/example/src/main/scala/aecor/example/account/AccountRoute.scala
  67. +15 −29 modules/example/src/main/scala/aecor/example/{domain/account/Account.scala → account/Algebra.scala}
  68. +16 −0 modules/example/src/main/scala/aecor/example/account/DefaultAccountService.scala
  69. +97 −0 modules/example/src/main/scala/aecor/example/account/EventsourcedAlgebra.scala
  70. +23 −0 modules/example/src/main/scala/aecor/example/account/Rejection.scala
  71. +6 −0 modules/example/src/main/scala/aecor/example/account/account.scala
  72. +20 −0 modules/example/src/main/scala/aecor/example/account/deployment.scala
  73. +2 −2 modules/example/src/main/scala/aecor/example/{domain → common}/Amount.scala
  74. +1 −2 modules/example/src/main/scala/aecor/example/{domain → common}/Timestamp.scala
  75. +0 −91 modules/example/src/main/scala/aecor/example/domain/account/EventsourcedAccount.scala
  76. +0 −132 ...es/example/src/main/scala/aecor/example/domain/transaction/EventsourcedTransactionAggregate.scala
  77. +31 −0 modules/example/src/main/scala/aecor/example/process/FS2QueueProcess.scala
  78. +18 −35 ...c/main/scala/aecor/example/{domain/TransactionProcess.scala → process/TransactionProcessor.scala}
  79. +12 −10 ...n/scala/aecor/example/{domain/transaction/TransactionAggregate.scala → transaction/Algebra.scala}
  80. +48 −0 modules/example/src/main/scala/aecor/example/transaction/DefaultTransactionService.scala
  81. +127 −0 modules/example/src/main/scala/aecor/example/transaction/EventsourcedAlgebra.scala
  82. +7 −8 modules/example/src/main/scala/aecor/example/{domain → }/transaction/TransactionEvent.scala
  83. +72 −0 modules/example/src/main/scala/aecor/example/transaction/TransactionRoute.scala
  84. +23 −0 modules/example/src/main/scala/aecor/example/transaction/deployment.scala
  85. +6 −0 modules/example/src/main/scala/aecor/example/transaction/transaction.scala
  86. +7 −8 modules/schedule/src/main/scala/aecor/schedule/CassandraScheduleEntryRepository.scala
  87. +3 −3 modules/schedule/src/main/scala/aecor/schedule/DefaultSchedule.scala
  88. +104 −37 modules/schedule/src/main/scala/aecor/schedule/DefaultScheduleBucket.scala
  89. +2 −2 modules/schedule/src/main/scala/aecor/schedule/Schedule.scala
  90. +2 −0 modules/schedule/src/main/scala/aecor/schedule/ScheduleBucket.scala
  91. +13 −6 modules/schedule/src/main/scala/aecor/schedule/process/ScheduleProcess.scala
  92. +0 −50 modules/schedule/src/main/scala/aecor/schedule/protobuf/ScheduleEventCodec.scala
  93. +42 −24 modules/test-kit/src/main/scala/aecor/testkit/E2eSupport.scala
  94. +2 −2 modules/test-kit/src/main/scala/aecor/testkit/StateClock.scala
  95. +15 −14 modules/test-kit/src/main/scala/aecor/testkit/StateEventJournal.scala
  96. +2 −1 modules/test-kit/src/main/scala/aecor/testkit/StateKeyValueStore.scala
  97. +0 −62 modules/test-kit/src/main/scala/aecor/testkit/StateRuntime.scala
  98. +25 −12 modules/tests/src/main/scala/aecor/tests/e2e/Counter.scala
  99. +12 −11 modules/tests/src/main/scala/aecor/tests/e2e/notification.scala
  100. +0 −28 modules/tests/src/test/scala/aecor/runtime/akkageneric/tests/MessageSerializerTest.scala
  101. +27 −19 modules/tests/src/test/scala/aecor/tests/AkkaPersistenceRuntimeSpec.scala
  102. +23 −24 modules/tests/src/test/scala/aecor/tests/BoopickleWireProtocolTest.scala
  103. +28 −23 modules/tests/src/test/scala/aecor/tests/EndToEndTest.scala
  104. +24 −13 modules/tests/src/test/scala/aecor/tests/EventsourcedBehaviorTSpec.scala
  105. +0 −73 modules/tests/src/test/scala/aecor/tests/GenericRuntimeSpec.scala
  106. +18 −18 modules/tests/src/test/scala/aecor/tests/ScheduleBucketSpec.scala
  107. +8 −11 modules/tests/src/test/scala/aecor/tests/ScheduleEventCodecSpec.scala
  108. +0 −51 modules/tests/src/test/scala/aecor/tests/StateRuntimeSpec.scala
  109. +1 −1 project/build.properties
@@ -76,3 +76,5 @@ project/plugins/project/
# Ensime
.ensime
.ensime_cache/
.DS_Store
@@ -6,4 +6,6 @@ align.arrowEnumeratorGenerator = true
align.openParenCallSite = false
spaces {
inImportCurlyBraces = true
}
}
rewrite.rules = [AsciiSortImports, RedundantBraces, RedundantParens]
unindentTopLevelOperators = true
@@ -1,6 +1,5 @@
language: scala
scala:
- 2.11.12
- 2.12.4
jdk:
247 build.sbt
@@ -5,151 +5,154 @@ import pl.project13.scala.sbt._
lazy val buildSettings = inThisBuild(
Seq(
organization := "io.aecor",
scalaVersion := "2.11.12",
crossScalaVersions := Seq("2.11.12", "2.12.4")
scalaVersion := "2.12.4"
)
)
lazy val akkaVersion = "2.5.9"
lazy val akkaPersistenceCassandraVersion = "0.59"
lazy val akkaPersistenceJdbcVersion = "3.2.0"
lazy val catsVersion = "1.1.0"
lazy val catsEffectVersion = "0.10"
lazy val akkaVersion = "2.5.15"
lazy val akkaPersistenceCassandraVersion = "0.61"
lazy val catsVersion = "1.4.0"
lazy val catsEffectVersion = "1.0.0"
lazy val scodecVersion = "1.10.4"
lazy val logbackVersion = "1.1.7"
lazy val cassandraDriverExtrasVersion = "3.1.0"
lazy val jsr305Version = "3.0.1"
lazy val boopickleVersion = "1.3.0"
lazy val monocleVersion = "1.5.0-cats"
lazy val fs2Version = "1.0.0"
lazy val log4catsVersion = "0.2.0-M1"
lazy val monixVersion = "3.0.0-M3"
lazy val scalaCheckVersion = "1.13.4"
lazy val scalaTestVersion = "3.0.1"
lazy val scalaTestVersion = "3.0.5"
lazy val scalaCheckShapelessVersion = "1.1.4"
lazy val shapelessVersion = "2.3.3"
lazy val kindProjectorVersion = "0.9.4"
lazy val kindProjectorVersion = "0.9.7"
lazy val scalametaVersion = "1.8.0"
// Example dependencies
lazy val circeVersion = "0.9.0"
lazy val akkaHttpVersion = "10.0.11"
lazy val akkaHttpJsonVersion = "1.19.0"
lazy val circeVersion = "0.9.3"
lazy val http4sVersion = "0.20.0-M1"
lazy val scalametaParadiseVersion = "3.0.0-M10"
lazy val liberatorVersion = "0.8.0"
lazy val catsTaglessVersion = "0.1.0"
lazy val commonSettings = Seq(
resolvers += "jitpack" at "https://jitpack.io",
scalacOptions ++= commonScalacOptions,
addCompilerPlugin("org.spire-math" %% "kind-projector" % kindProjectorVersion),
parallelExecution in Test := false,
scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value
.filter(_ != "-Xfatal-warnings")
.filter(_ != "-Xfatal-warnings")
) ++ warnUnusedImport
lazy val aecorSettings = buildSettings ++ commonSettings ++ publishSettings
lazy val aecor = project
.in(file("."))
.withId("aecor")
.settings(moduleName := "aecor", name := "Aecor")
.settings(aecorSettings)
.settings(noPublishSettings)
.aggregate(
core,
boopickleWireProtocol,
akkaPersistence,
akkaGeneric,
distributedProcessing,
example,
schedule,
testKit,
tests,
benchmarks
)
.in(file("."))
.withId("aecor")
.settings(moduleName := "aecor", name := "Aecor")
.settings(aecorSettings)
.settings(noPublishSettings)
.aggregate(
core,
boopickleWireProtocol,
akkaPersistence,
akkaGeneric,
distributedProcessing,
example,
schedule,
testKit,
tests,
benchmarks
)
def aecorModule(id: String, description: String): Project =
Project(id, file(s"modules/$id"))
.settings(
moduleName := id,
name := description
)
.settings(moduleName := id, name := description)
lazy val core = aecorModule("core", "Aecor Core")
.settings(aecorSettings)
.settings(coreSettings)
lazy val boopickleWireProtocol = aecorModule("boopickle-wire-protocol", "Aecor Boopickle Wire Protocol derivation")
.dependsOn(core)
.settings(aecorSettings)
.settings(boopickleWireProtocolSettings)
lazy val akkaPersistence = aecorModule("akka-persistence-runtime",
"Aecor Runtime based on Akka Cluster Sharding and Persistence"
)
.dependsOn(core)
.settings(aecorSettings)
.settings(akkaPersistenceSettings)
.settings(aecorSettings)
.settings(coreSettings)
lazy val boopickleWireProtocol =
aecorModule("boopickle-wire-protocol", "Aecor Boopickle Wire Protocol derivation")
.dependsOn(core)
.settings(aecorSettings)
.settings(boopickleWireProtocolSettings)
lazy val akkaPersistence = aecorModule(
"akka-persistence-runtime",
"Aecor Runtime based on Akka Cluster Sharding and Persistence"
).dependsOn(core)
.settings(aecorSettings)
.settings(akkaPersistenceSettings)
lazy val akkaGeneric = aecorModule("akka-cluster-runtime", "Aecor Runtime based on Akka Cluster Sharding")
.dependsOn(core)
.settings(aecorSettings)
.settings(akkaPersistenceSettings)
lazy val akkaGeneric =
aecorModule("akka-cluster-runtime", "Aecor Runtime based on Akka Cluster Sharding")
.dependsOn(core)
.dependsOn(boopickleWireProtocol % "test->compile")
.settings(aecorSettings)
.settings(commonTestSettings)
.settings(akkaGenericSettings)
lazy val distributedProcessing =
aecorModule("distributed-processing", "Aecor Distributed Processing")
.dependsOn(core)
.settings(aecorSettings)
.settings(distributedProcessingSettings)
.dependsOn(core)
.settings(aecorSettings)
.settings(distributedProcessingSettings)
lazy val schedule = aecorModule("schedule", "Aecor Schedule")
.dependsOn(akkaPersistence, distributedProcessing, boopickleWireProtocol)
.settings(aecorSettings)
.settings(scheduleSettings)
.dependsOn(akkaPersistence, distributedProcessing, boopickleWireProtocol)
.settings(aecorSettings)
.settings(scheduleSettings)
lazy val testKit = aecorModule("test-kit", "Aecor Test Kit")
.dependsOn(core)
.settings(aecorSettings)
.settings(testKitSettings)
.dependsOn(core)
.settings(aecorSettings)
.settings(testKitSettings)
lazy val tests = aecorModule("tests", "Aecor Tests")
.dependsOn(
core,
example,
schedule,
testKit,
akkaPersistence,
distributedProcessing,
akkaGeneric,
boopickleWireProtocol
)
.settings(aecorSettings)
.settings(noPublishSettings)
.settings(testingSettings)
.dependsOn(
core,
schedule,
testKit,
akkaPersistence,
distributedProcessing,
boopickleWireProtocol
)
.settings(aecorSettings)
.settings(noPublishSettings)
.settings(testingSettings)
lazy val example = aecorModule("example", "Aecor Example Application")
.dependsOn(core, schedule, distributedProcessing, boopickleWireProtocol)
.settings(aecorSettings)
.settings(noPublishSettings)
.settings(exampleSettings)
.dependsOn(core, schedule, distributedProcessing, boopickleWireProtocol)
.settings(aecorSettings)
.settings(noPublishSettings)
.settings(exampleSettings)
lazy val benchmarks = aecorModule("benchmarks", "Aecor Benchmarks")
.dependsOn(core)
.settings(aecorSettings)
.settings(noPublishSettings)
.enablePlugins(JmhPlugin)
.dependsOn(core)
.settings(aecorSettings)
.settings(noPublishSettings)
.enablePlugins(JmhPlugin)
lazy val coreSettings = Seq(
libraryDependencies ++= Seq(
"io.aecor" %% "liberator" % liberatorVersion,
"org.typelevel" %% "cats-tagless-macros" % catsTaglessVersion,
"com.chuusai" %% "shapeless" % shapelessVersion,
"org.typelevel" %% "cats-core" % catsVersion,
"org.typelevel" %% "cats-effect" % catsEffectVersion
"org.typelevel" %% "cats-effect" % catsEffectVersion,
"org.scodec" %% "scodec-bits" % "1.1.6",
"org.scodec" %% "scodec-core" % "1.10.3"
)
)
lazy val boopickleWireProtocolSettings = Seq(
addCompilerPlugin("org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch),
addCompilerPlugin(
"org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch
),
sources in (Compile, doc) := Nil,
scalacOptions in (Compile, console) := Seq(),
libraryDependencies ++= Seq(
@@ -160,47 +163,50 @@ lazy val boopickleWireProtocolSettings = Seq(
lazy val scheduleSettings = commonProtobufSettings ++ Seq(
sources in (Compile, doc) := Nil,
addCompilerPlugin("org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch),
addCompilerPlugin(
"org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch
),
libraryDependencies ++= Seq(
"com.datastax.cassandra" % "cassandra-driver-extras" % cassandraDriverExtrasVersion,
"com.google.code.findbugs" % "jsr305" % jsr305Version % Compile
)
)
lazy val distributedProcessingSettings = commonProtobufSettings ++ Seq(
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion
)
libraryDependencies ++= Seq("com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion)
)
lazy val akkaPersistenceSettings = commonProtobufSettings ++ Seq(
lazy val akkaPersistenceSettings = commonProtobufSettings ++ Seq(
libraryDependencies ++= Seq(
"co.fs2" %% "fs2-core" % fs2Version,
"com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion,
"com.typesafe.akka" %% "akka-persistence" % akkaVersion,
"com.typesafe.akka" %% "akka-persistence-query" % akkaVersion,
"com.typesafe.akka" %% "akka-persistence-cassandra" % akkaPersistenceCassandraVersion,
"com.github.dnvriend" %% "akka-persistence-jdbc" % akkaPersistenceJdbcVersion
"com.typesafe.akka" %% "akka-persistence-cassandra" % akkaPersistenceCassandraVersion
)
)
lazy val akkaGenericSettings = commonProtobufSettings ++ Seq(
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion
)
libraryDependencies ++= Seq("com.typesafe.akka" %% "akka-cluster-sharding" % akkaVersion)
)
lazy val exampleSettings = {
Seq(
addCompilerPlugin("org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch),
addCompilerPlugin(
"org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch
),
resolvers += Resolver.sonatypeRepo("releases"),
resolvers += "krasserm at bintray" at "http://dl.bintray.com/krasserm/maven",
libraryDependencies ++=
Seq(
"io.aecor" %% "liberator" % liberatorVersion,
"com.github.krasserm" %% "streamz-converter" % "0.10-M1",
"co.fs2" %% "fs2-core" % "1.0.0",
"org.typelevel" %% "cats-mtl-core" % "0.4.0",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"io.monix" %% "monix-reactive" % monixVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"de.heikoseeberger" %% "akka-http-circe" % akkaHttpJsonVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion,
"org.http4s" %% "http4s-blaze-server" % http4sVersion,
"org.http4s" %% "http4s-circe" % http4sVersion,
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
@@ -212,15 +218,21 @@ lazy val exampleSettings = {
lazy val testKitSettings = Seq(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-mtl-core" % "0.2.3",
"com.github.julien-truffaut" %% "monocle-core" % monocleVersion,
"com.github.julien-truffaut" %% "monocle-macro" % monocleVersion
"org.typelevel" %% "cats-mtl-core" % "0.4.0",
"com.github.julien-truffaut" %% "monocle-core" % monocleVersion,
"com.github.julien-truffaut" %% "monocle-macro" % monocleVersion
)
)
lazy val testingSettings = Seq(
addCompilerPlugin("org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch),
addCompilerPlugin(
"org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch
),
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
"io.circe" %% "circe-java8" % circeVersion,
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % Test,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
@@ -230,6 +242,21 @@ lazy val testingSettings = Seq(
)
)
lazy val commonTestSettings =
Seq(
addCompilerPlugin(
"org.scalameta" % "paradise" % scalametaParadiseVersion cross CrossVersion.patch
),
libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % scalaCheckVersion % Test,
"org.scalatest" %% "scalatest" % scalaTestVersion % Test,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion % Test,
"com.typesafe.akka" %% "akka-persistence-cassandra-launcher" % akkaPersistenceCassandraVersion % Test,
"com.github.alexarchambault" %% "scalacheck-shapeless_1.13" % scalaCheckShapelessVersion % Test,
"org.typelevel" %% "cats-testkit" % catsVersion % Test
)
)
lazy val commonProtobufSettings =
Seq(
PB.targets in Compile := Seq(
@@ -258,9 +285,9 @@ lazy val commonScalacOptions = Seq(
"-Xsource:2.13"
)
lazy val warnUnusedImport = Seq(scalacOptions in (Compile, console) ~= {
_.filterNot(Set("-Ywarn-unused-import", "-Ywarn-value-discard"))
}, scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value)
lazy val warnUnusedImport = Seq(
scalacOptions in (Compile, console) --= Seq("-Ywarn-unused:imports", "-Xfatal-warnings")
)
lazy val noPublishSettings = Seq(publish := (()), publishLocal := (()), publishArtifact := false)
Oops, something went wrong.

0 comments on commit 30a5858

Please sign in to comment.