diff --git a/build.sbt b/build.sbt index bc97ad33..06fa72dd 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,13 @@ +import scoverage.ScoverageKeys.coverageMinimum + organization := "io.laserdisc" name := "fs2-aws" scalaVersion := "2.12.10" +val fs2Version = "2.2.2" +val AwsSdkVersion = "1.11.717" +val cirisVersion = "0.12.1" + lazy val root = (project in file(".")) .aggregate(`fs2-aws`, `fs2-aws-testkit`, `fs2-aws-dynamodb`, `fs2-aws-core`, `fs2-aws-examples`) .settings( @@ -9,14 +15,56 @@ lazy val root = (project in file(".")) ) lazy val `fs2-aws-core` = (project in file("fs2-aws-core")) + .settings( + name := "fs2-aws-core", + libraryDependencies ++= Seq( + "co.fs2" %% "fs2-core" % "2.2.2", + "co.fs2" %% "fs2-io" % "2.2.2", + "org.typelevel" %% "alleycats-core" % "2.1.0", + "org.scalatest" %% "scalatest" % "3.1.0" % Test, + "org.mockito" % "mockito-core" % "3.2.4" % Test, + "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test + ), + coverageMinimum := 40, + coverageFailOnMinimum := true + ) .settings(commonSettings) lazy val `fs2-aws-dynamodb` = (project in file("fs2-aws-dynamodb")) .dependsOn(`fs2-aws-core`) + .settings( + name := "fs2-aws-dynamodb", + coverageMinimum := 40, + coverageFailOnMinimum := true, + libraryDependencies ++= Seq( + "co.fs2" %% "fs2-core" % fs2Version, + "co.fs2" %% "fs2-io" % fs2Version, + "org.typelevel" %% "alleycats-core" % "2.1.0", + "org.scalatest" %% "scalatest" % "3.1.0" % Test, + "org.mockito" % "mockito-core" % "3.2.4" % Test, + "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test, + "com.amazonaws" % "dynamodb-streams-kinesis-adapter" % "1.5.0", + "io.laserdisc" %% "scanamo-circe" % "1.0.5" + ) + ) .settings(commonSettings) lazy val `fs2-aws-examples` = (project in file("fs2-aws-examples")) .dependsOn(`fs2-aws-dynamodb`) + .settings( + name := "fs2-aws-examples", + coverageMinimum := 0, + libraryDependencies ++= Seq( + "org.mockito" % "mockito-core" % "3.2.4" % Test, + "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test, + "ch.qos.logback" % "logback-classic" % "1.2.3", + "ch.qos.logback" % "logback-core" % "1.2.3", + "org.slf4j" % "jcl-over-slf4j" % "1.7.30", + "org.slf4j" % "jul-to-slf4j" % "1.7.30", + "io.chrisdavenport" %% "log4cats-slf4j" % "1.0.1", + "io.laserdisc" %% "scanamo-circe" % "1.0.5" + ) + ) .settings(commonSettings) .settings( skip in publish := true @@ -24,6 +72,30 @@ lazy val `fs2-aws-examples` = (project in file("fs2-aws-examples")) lazy val `fs2-aws` = (project in file("fs2-aws")) .dependsOn(`fs2-aws-core`) + .settings( + name := "fs2-aws", + libraryDependencies ++= Seq( + "co.fs2" %% "fs2-core" % fs2Version, + "co.fs2" %% "fs2-io" % fs2Version, + "com.amazonaws" % "aws-java-sdk-kinesis" % AwsSdkVersion, + "com.amazonaws" % "aws-java-sdk-s3" % AwsSdkVersion, + "com.amazonaws" % "aws-java-sdk-sqs" % AwsSdkVersion, + "com.amazonaws" % "amazon-kinesis-producer" % "0.14.0", + "software.amazon.kinesis" % "amazon-kinesis-client" % "2.2.8", + "software.amazon.awssdk" % "sts" % "2.10.59", + "org.scalatest" %% "scalatest" % "3.1.0" % Test, + "org.mockito" % "mockito-core" % "3.2.4" % Test, + "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test, + "com.amazonaws" % "aws-java-sdk-sqs" % AwsSdkVersion excludeAll ("commons-logging", "commons-logging"), + "com.amazonaws" % "amazon-sqs-java-messaging-lib" % "1.0.8" excludeAll ("commons-logging", "commons-logging"), + "is.cir" %% "ciris-core" % cirisVersion, + "is.cir" %% "ciris-enumeratum" % cirisVersion, + "is.cir" %% "ciris-refined" % cirisVersion, + "eu.timepit" %% "refined" % "0.9.12" + ), + coverageMinimum := 40, + coverageFailOnMinimum := true + ) .settings(commonSettings) lazy val `fs2-aws-testkit` = (project in file("fs2-aws-testkit")) @@ -36,6 +108,7 @@ addCommandAlias("checkFormat", ";scalafmtCheck;test:scalafmtCheck;scalafmtSbtChe lazy val commonSettings = Seq( organization := "io.laserdisc", + scalaVersion := "2.12.10", scalacOptions ++= Seq( "-target:jvm-1.8", "-encoding", @@ -48,7 +121,9 @@ lazy val commonSettings = Seq( "-Xlint", // enable handy linter warnings "-Xfatal-warnings", // turn compiler warnings into errors "-Ypartial-unification" // allow the compiler to unify type constructors of different arities - ) + ), + addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1"), + addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3") ) addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.10") diff --git a/fs2-aws-core/build.sbt b/fs2-aws-core/build.sbt deleted file mode 100644 index 6b398f42..00000000 --- a/fs2-aws-core/build.sbt +++ /dev/null @@ -1,19 +0,0 @@ -organization := "io.laserdisc" -name := "fs2-aws-core" - -// coverage -coverageMinimum := 40 -coverageFailOnMinimum := true - -scalaVersion := "2.12.10" - -val fs2Version = "2.2.2" - -libraryDependencies ++= Seq( - "co.fs2" %% "fs2-core" % fs2Version, - "co.fs2" %% "fs2-io" % fs2Version, - "org.typelevel" %% "alleycats-core" % "2.1.0", - "org.scalatest" %% "scalatest" % "3.1.0" % Test, - "org.mockito" % "mockito-core" % "3.2.4" % Test, - "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test -) diff --git a/fs2-aws-dynamodb/build.sbt b/fs2-aws-dynamodb/build.sbt deleted file mode 100644 index b331be3a..00000000 --- a/fs2-aws-dynamodb/build.sbt +++ /dev/null @@ -1,23 +0,0 @@ -organization := "io.laserdisc" -name := "fs2-aws-dynamodb" - -// coverage -coverageMinimum := 40 -coverageFailOnMinimum := true - -scalaVersion := "2.12.10" - -val fs2Version = "2.2.2" -val AwsSdkVersion = "1.11.716" -val cirisVersion = "0.12.1" - -libraryDependencies ++= Seq( - "co.fs2" %% "fs2-core" % fs2Version, - "co.fs2" %% "fs2-io" % fs2Version, - "org.typelevel" %% "alleycats-core" % "2.1.0", - "org.scalatest" %% "scalatest" % "3.1.0" % Test, - "org.mockito" % "mockito-core" % "3.2.4" % Test, - "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test, - "com.amazonaws" % "dynamodb-streams-kinesis-adapter" % "1.5.0", - "io.laserdisc" %% "scanamo-circe" % "1.0.5" -) diff --git a/fs2-aws-examples/build.sbt b/fs2-aws-examples/build.sbt deleted file mode 100644 index 15f198ca..00000000 --- a/fs2-aws-examples/build.sbt +++ /dev/null @@ -1,26 +0,0 @@ -organization := "io.laserdisc" -name := "fs2-aws-examples" - -// coverage -coverageMinimum := 0 -coverageFailOnMinimum := true - -scalaVersion := "2.12.10" - -val fs2Version = "2.2.2" -val AwsSdkVersion = "1.11.716" -val cirisVersion = "0.12.1" - -libraryDependencies ++= Seq( - "org.mockito" % "mockito-core" % "3.2.4" % Test, - "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test, - "ch.qos.logback" % "logback-classic" % "1.2.3", - "ch.qos.logback" % "logback-core" % "1.2.3", - "org.slf4j" % "jcl-over-slf4j" % "1.7.30", - "org.slf4j" % "jul-to-slf4j" % "1.7.30", - "io.chrisdavenport" %% "log4cats-slf4j" % "1.0.1", - "io.laserdisc" %% "scanamo-circe" % "1.0.5" -) - -addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1") -addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.3") diff --git a/fs2-aws/build.sbt b/fs2-aws/build.sbt deleted file mode 100644 index fd4679fe..00000000 --- a/fs2-aws/build.sbt +++ /dev/null @@ -1,32 +0,0 @@ -organization := "io.laserdisc" -name := "fs2-aws" - -// coverage -coverageMinimum := 40 -coverageFailOnMinimum := true - -scalaVersion := "2.12.10" - -val fs2Version = "2.2.2" -val AwsSdkVersion = "1.11.717" -val cirisVersion = "0.12.1" - -libraryDependencies ++= Seq( - "co.fs2" %% "fs2-core" % fs2Version, - "co.fs2" %% "fs2-io" % fs2Version, - "com.amazonaws" % "aws-java-sdk-kinesis" % AwsSdkVersion, - "com.amazonaws" % "aws-java-sdk-s3" % AwsSdkVersion, - "com.amazonaws" % "aws-java-sdk-sqs" % AwsSdkVersion, - "com.amazonaws" % "amazon-kinesis-producer" % "0.14.0", - "software.amazon.kinesis" % "amazon-kinesis-client" % "2.2.8", - "software.amazon.awssdk" % "sts" % "2.10.59", - "org.scalatest" %% "scalatest" % "3.1.0" % Test, - "org.mockito" % "mockito-core" % "3.2.4" % Test, - "org.mockito" %% "mockito-scala-scalatest" % "1.11.2" % Test, - "com.amazonaws" % "aws-java-sdk-sqs" % AwsSdkVersion excludeAll ("commons-logging", "commons-logging"), - "com.amazonaws" % "amazon-sqs-java-messaging-lib" % "1.0.8" excludeAll ("commons-logging", "commons-logging"), - "is.cir" %% "ciris-core" % cirisVersion, - "is.cir" %% "ciris-enumeratum" % cirisVersion, - "is.cir" %% "ciris-refined" % cirisVersion, - "eu.timepit" %% "refined" % "0.9.12" -)