diff --git a/cloudflow-it/swiss-knife/build.sbt b/cloudflow-it/swiss-knife/build.sbt index 1e116a2..ad12dc9 100644 --- a/cloudflow-it/swiss-knife/build.sbt +++ b/cloudflow-it/swiss-knife/build.sbt @@ -2,70 +2,49 @@ import sbt._ import sbt.Keys._ lazy val swissKnife = (project in file(".")) - .enablePlugins(ScalafmtPlugin) - .settings( - scalafmtOnCompile := true, - organization := "com.lightbend.cloudflow", - headerLicense := Some(HeaderLicense.ALv2("(C) 2016-2021", "Lightbend Inc. ")) - ) - .settings(commonSettings) - .aggregate( - app, - datamodel, - flink, - akka, - spark - ) -lazy val app = (project in file("./app")) + .enablePlugins(ScalafmtPlugin) .settings( - name:= "swiss-knife" - ) + scalafmtOnCompile := true, + organization := "com.lightbend.cloudflow", + headerLicense := Some(HeaderLicense.ALv2("(C) 2016-2021", "Lightbend Inc. "))) + .settings(commonSettings) + .aggregate(app, datamodel, flink, akka, spark) +lazy val app = (project in file("./app")) + .settings(name := "swiss-knife") .enablePlugins(CloudflowApplicationPlugin) .settings(commonSettings) - .settings( - name := "swiss-knife", - runLocalConfigFile := Some("app/src/main/resources/local.conf"), - ) - + .settings(name := "swiss-knife", runLocalConfigFile := Some("app/src/main/resources/local.conf")) + lazy val datamodel = (project in file("datamodel")) .settings( commonSettings, Compile / sourceGenerators += (Compile / avroScalaGenerateSpecific).taskValue, - libraryDependencies += Cloudflow.library.CloudflowAvro - ) + libraryDependencies += Cloudflow.library.CloudflowAvro) lazy val akka = (project in file("./akka")) .enablePlugins(CloudflowAkkaPlugin) .settings(commonSettings) - .settings( - name := "swiss-knife-akka", - libraryDependencies ++= Seq( - "ch.qos.logback" % "logback-classic" % "1.2.10", - ) - ) + .settings(name := "swiss-knife-akka", libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.2.12")) .dependsOn(datamodel) lazy val spark = (project in file("./spark")) .enablePlugins(CloudflowNativeSparkPlugin) - .settings(commonSettings) - .settings( - name := "swiss-knife-spark", - ) + .settings(commonSettings) + .settings(name := "swiss-knife-spark") .dependsOn(datamodel) lazy val flink = (project in file("./flink")) .enablePlugins(CloudflowNativeFlinkPlugin) .settings(commonSettings) - .settings( - name := "swiss-knife-flink", - ) + .settings(name := "swiss-knife-flink") .dependsOn(datamodel) lazy val commonSettings = Seq( headerLicense := Some(HeaderLicense.ALv2("(C) 2016-2020", "Lightbend Inc. ")), scalaVersion := "2.12.15", scalacOptions ++= Seq( - "-encoding", "UTF-8", + "-encoding", + "UTF-8", "-target:jvm-1.8", "-Xlog-reflective-calls", "-Xlint", @@ -74,8 +53,6 @@ lazy val commonSettings = Seq( "-deprecation", "-feature", "-language:_", - "-unchecked" - ) -) + "-unchecked")) dynverSeparator in ThisBuild := "-" diff --git a/examples/call-record-aggregator/build.sbt b/examples/call-record-aggregator/build.sbt index de7c1c9..f3c8f58 100644 --- a/examples/call-record-aggregator/build.sbt +++ b/examples/call-record-aggregator/build.sbt @@ -4,79 +4,58 @@ import sbt.Keys._ lazy val root = Project(id = "root", base = file(".")) .enablePlugins(ScalafmtPlugin) - .settings( - name := "root", - scalafmtOnCompile := true, - publish / skip := true, - ) + .settings(name := "root", scalafmtOnCompile := true, publish / skip := true) .withId("root") .settings(commonSettings) - .aggregate( - callRecordPipeline, - datamodel, - akkaCdrIngestor, - akkaJavaAggregationOutput, - sparkAggregation - ) + .aggregate(callRecordPipeline, datamodel, akkaCdrIngestor, akkaJavaAggregationOutput, sparkAggregation) //tag::docs-CloudflowApplicationPlugin-example[] lazy val callRecordPipeline = appModule("call-record-pipeline") .enablePlugins(CloudflowApplicationPlugin) .settings(commonSettings) - .settings( - name := "call-record-aggregator" - ) - + .settings(name := "call-record-aggregator") + //end::docs-CloudflowApplicationPlugin-example[] lazy val datamodel = appModule("datamodel") .settings( Compile / sourceGenerators += (Compile / avroScalaGenerateSpecific).taskValue, - libraryDependencies += Cloudflow.library.CloudflowAvro - ) + libraryDependencies += Cloudflow.library.CloudflowAvro) -lazy val akkaCdrIngestor= appModule("akka-cdr-ingestor") - .enablePlugins(CloudflowAkkaPlugin) - .settings( - commonSettings, - libraryDependencies ++= Seq( - "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.12", - "ch.qos.logback" % "logback-classic" % "1.2.10", - "org.scalatest" %% "scalatest" % "3.0.8" % "test" - ) - ) +lazy val akkaCdrIngestor = appModule("akka-cdr-ingestor") + .enablePlugins(CloudflowAkkaPlugin) + .settings( + commonSettings, + libraryDependencies ++= Seq( + "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.12", + "ch.qos.logback" % "logback-classic" % "1.2.12", + "org.scalatest" %% "scalatest" % "3.0.8" % "test")) .dependsOn(datamodel) -lazy val akkaJavaAggregationOutput= appModule("akka-java-aggregation-output") +lazy val akkaJavaAggregationOutput = appModule("akka-java-aggregation-output") .enablePlugins(CloudflowAkkaPlugin) .settings( commonSettings, libraryDependencies ++= Seq( - "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.12", - "ch.qos.logback" % "logback-classic" % "1.2.10", - "org.scalatest" %% "scalatest" % "3.0.8" % "test" - ) - ) + "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.12", + "ch.qos.logback" % "logback-classic" % "1.2.12", + "org.scalatest" %% "scalatest" % "3.0.8" % "test")) .dependsOn(datamodel) lazy val sparkAggregation = appModule("spark-aggregation") - .enablePlugins(CloudflowNativeSparkPlugin) - .settings( - commonSettings, - Test / parallelExecution := false, - Test / fork := true, - libraryDependencies ++= Seq( - "ch.qos.logback" % "logback-classic" % "1.2.10", - "org.scalatest" %% "scalatest" % "3.0.8" % "test" - ) - ) + .enablePlugins(CloudflowNativeSparkPlugin) + .settings( + commonSettings, + Test / parallelExecution := false, + Test / fork := true, + libraryDependencies ++= Seq( + "ch.qos.logback" % "logback-classic" % "1.2.12", + "org.scalatest" %% "scalatest" % "3.0.8" % "test")) .dependsOn(datamodel) def appModule(moduleID: String): Project = { Project(id = moduleID, base = file(moduleID)) - .settings( - name := moduleID - ) + .settings(name := moduleID) .withId(moduleID) .settings(commonSettings) } @@ -87,7 +66,8 @@ lazy val commonSettings = Seq( scalaVersion := "2.12.15", javacOptions += "-Xlint:deprecation", scalacOptions ++= Seq( - "-encoding", "UTF-8", + "-encoding", + "UTF-8", "-target:jvm-1.8", "-Xlog-reflective-calls", "-Xlint", @@ -96,12 +76,8 @@ lazy val commonSettings = Seq( "-deprecation", "-feature", "-language:_", - "-unchecked" - ), - + "-unchecked"), scalacOptions in (Compile, console) --= Seq("-Ywarn-unused", "-Ywarn-unused-import"), - scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value - -) + scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value) dynverSeparator in ThisBuild := "-" diff --git a/examples/taxi-ride/build.sbt b/examples/taxi-ride/build.sbt index 14683cf..e620658 100644 --- a/examples/taxi-ride/build.sbt +++ b/examples/taxi-ride/build.sbt @@ -5,20 +5,10 @@ import cloudflow.sbt.CommonSettingsAndTasksPlugin._ lazy val root = Project(id = "root", base = file(".")) .enablePlugins(ScalafmtPlugin) - .settings( - name := "root", - publish / skip := true, - scalafmtOnCompile := true, - ) + .settings(name := "root", publish / skip := true, scalafmtOnCompile := true) .withId("root") .settings(commonSettings) - .aggregate( - taxiRidePipeline, - datamodel, - ingestor, - processor, - ridelogger - ) + .aggregate(taxiRidePipeline, datamodel, ingestor, processor, ridelogger) lazy val taxiRidePipeline = appModule("taxi-ride-pipeline") .enablePlugins(CloudflowApplicationPlugin) @@ -26,43 +16,35 @@ lazy val taxiRidePipeline = appModule("taxi-ride-pipeline") .settings( name := "taxi-ride-fare", runLocalConfigFile := Some("taxi-ride-pipeline/src/main/resources/local.conf"), - runLocalLog4jConfigFile := Some("taxi-ride-pipeline/src/main/resources/log4j.properties") - ) + runLocalLog4jConfigFile := Some("taxi-ride-pipeline/src/main/resources/log4j.properties")) lazy val datamodel = appModule("datamodel") .settings( commonSettings, Compile / sourceGenerators += (Compile / avroScalaGenerateSpecific).taskValue, - libraryDependencies += Cloudflow.library.CloudflowAvro - ) + libraryDependencies += Cloudflow.library.CloudflowAvro) lazy val ingestor = appModule("ingestor") .enablePlugins(CloudflowAkkaPlugin) .settings( commonSettings, libraryDependencies ++= Seq( - "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.12", - "ch.qos.logback" % "logback-classic" % "1.2.10", - "org.scalatest" %% "scalatest" % "3.0.8" % "test" - ) - ) + "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.12", + "ch.qos.logback" % "logback-classic" % "1.2.12", + "org.scalatest" %% "scalatest" % "3.0.8" % "test")) .dependsOn(datamodel) - lazy val processor = appModule("processor") .enablePlugins(CloudflowNativeFlinkPlugin) .settings( commonSettings, libraryDependencies ++= Seq( - "ch.qos.logback" % "logback-classic" % "1.2.10", - "org.scalatest" %% "scalatest" % "3.0.8" % "test" - ), + "ch.qos.logback" % "logback-classic" % "1.2.12", + "org.scalatest" %% "scalatest" % "3.0.8" % "test"), dependencyOverrides ++= Seq( - "org.apache.kafka" % "kafka-clients" % "3.0.0", - "org.apache.commons" % "commons-compress" % "1.21" - ), - parallelExecution in Test := false - ) + "org.apache.kafka" % "kafka-clients" % "3.0.0", + "org.apache.commons" % "commons-compress" % "1.21"), + parallelExecution in Test := false) .dependsOn(datamodel) lazy val ridelogger = appModule("logger") @@ -70,17 +52,13 @@ lazy val ridelogger = appModule("logger") .settings( commonSettings, libraryDependencies ++= Seq( - "ch.qos.logback" % "logback-classic" % "1.2.10", - "org.scalatest" %% "scalatest" % "3.0.8" % "test" - ) - ) + "ch.qos.logback" % "logback-classic" % "1.2.12", + "org.scalatest" %% "scalatest" % "3.0.8" % "test")) .dependsOn(datamodel) def appModule(moduleID: String): Project = { Project(id = moduleID, base = file(moduleID)) - .settings( - name := moduleID - ) + .settings(name := moduleID) .withId(moduleID) .settings(commonSettings) } @@ -90,7 +68,8 @@ lazy val commonSettings = Seq( headerLicense := Some(HeaderLicense.ALv2("(C) 2016-2020", "Lightbend Inc. ")), scalaVersion := "2.12.15", scalacOptions ++= Seq( - "-encoding", "UTF-8", + "-encoding", + "UTF-8", "-target:jvm-1.8", "-Xlog-reflective-calls", "-Xlint", @@ -99,10 +78,8 @@ lazy val commonSettings = Seq( "-deprecation", "-feature", "-language:_", - "-unchecked" - ), + "-unchecked"), scalacOptions in (Compile, console) --= Seq("-Ywarn-unused", "-Ywarn-unused-import"), - scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value, -) + scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value) dynverSeparator in ThisBuild := "-" diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 71ecd20..94a63e6 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -15,7 +15,7 @@ object Dependencies { val jackson = "2.12.6" val fabric8 = "5.0.0" val scalaTest = "3.2.11" - val logbackVersion = "1.2.10" + val logbackVersion = "1.2.12" } object Compile {