Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Update logback-classic to 1.4.6 #1336

Open
wants to merge 1 commit into
base: main
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
63 changes: 23 additions & 40 deletions core/cloudflow-it/swiss-knife/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,45 @@ 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. <https://www.lightbend.com>"))
)
.settings(commonSettings)
.aggregate(
app,
datamodel,
akka
)
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. <https://www.lightbend.com>")))
.settings(commonSettings)
.aggregate(app, datamodel, akka)
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.11",
)
)
.settings(name := "swiss-knife-akka", libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))
.dependsOn(datamodel)

lazy val commonSettings = Seq(
headerLicense := Some(HeaderLicense.ALv2("(C) 2016-2020", "Lightbend Inc. <https://www.lightbend.com>")),
scalaVersion := "2.12.15",
scalacOptions ++= Seq(
"-encoding", "UTF-8",
"-target:jvm-1.8",
"-Xlog-reflective-calls",
"-Xlint",
"-Ywarn-unused",
"-Ywarn-unused-import",
"-deprecation",
"-feature",
"-language:_",
"-unchecked"
)
)
"-encoding",
"UTF-8",
"-target:jvm-1.8",
"-Xlog-reflective-calls",
"-Xlint",
"-Ywarn-unused",
"-Ywarn-unused-import",
"-deprecation",
"-feature",
"-language:_",
"-unchecked"))

dynverSeparator in ThisBuild := "-"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ lazy val helloWorld = (project in file("."))
name := "hello-world",
version := "0.0.1",
cloudflowDockerBaseImage := "adoptopenjdk/openjdk11:alpine",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",

cloudflowDockerBaseImage := "adoptopenjdk/openjdk11:alpine",

libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",
cloudflowDockerBaseImage := "adoptopenjdk/openjdk11:alpine",
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
cloudflowVersion := "2.0.19",
name := "hello-world",
// sbt 1.5: Do not fail when mixing versions of Cloudflow and dependencies
evictionErrorLevel := Level.Info,
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
cloudflowVersion := "2.0.19",
name := "hello-world",
// sbt 1.5: Do not fail when mixing versions of Cloudflow and dependencies
evictionErrorLevel := Level.Info,
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))

val checkCloudflowVersion = taskKey[Unit]("Testing the used version of cloudflow")
checkCloudflowVersion := {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",

libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))

val checkDuplicates = taskKey[Unit]("Testing there are no duplicate jars in the final image")
checkDuplicates := {
import scala.sys.process._

val res = (Seq("docker", "run", "--rm", "--entrypoint=sh", "hello-world:0.0.2", "-c", "ls /opt/cloudflow") #| Seq("grep", "hello-world")).!!
val res = (Seq("docker", "run", "--rm", "--entrypoint=sh", "hello-world:0.0.2", "-c", "ls /opt/cloudflow") #| Seq(
"grep",
"hello-world")).!!

assert { res.trim == "hello-world_2.12-0.0.2.jar" }
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",

cloudflowDockerImageName := Some(cloudflow.sbt.DockerImageName(s"localhost:5000/hello-world", "0.0.1")),
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",
cloudflowDockerImageName := Some(cloudflow.sbt.DockerImageName(s"localhost:5000/hello-world", "0.0.1")),
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))

val checkCRFile = taskKey[Unit]("Testing the CR file")
checkCRFile := {
val data = ujson.read(file("target/hello-world.json"))
val image = data("spec")("deployments")(0)("image").str

assert { image == "localhost:5000/hello-world:0.0.1"}
assert { image == "localhost:5000/hello-world:0.0.1" }
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",

libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.12.15",
name := "hello-world",
version := "0.0.1",
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))

val checkCRFile = taskKey[Unit]("Testing the CR file")
checkCRFile := {
val data = ujson.read(file("target/hello-world.json"))

val appId = data("spec")("app_id").str
val appVersion = data("spec")("app_version").str

val image = data("spec")("deployments")(0)("image").str

assert { appId == "hello-world" }
assert { !appVersion.contains("sha256") }
assert { image == "hello-world:0.0.1"}
assert { image == "hello-world:0.0.1" }
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.13.8",
name := "hello-world",
version := "0.0.1",

libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld = (project in file("."))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
scalaVersion := "2.13.8",
name := "hello-world",
version := "0.0.1",
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))

val checkCRFile = taskKey[Unit]("Testing the CR file")
checkCRFile := {
val data = ujson.read(file("target/hello-world.json"))

val appId = data("spec")("app_id").str
val appVersion = data("spec")("app_version").str

val image = data("spec")("deployments")(0)("image").str

assert { appId == "hello-world" }
assert { !appVersion.contains("sha256") }
assert { image == "hello-world:0.0.1"}
assert { image == "hello-world:0.0.1" }
}
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
val version1 = "1.2.3-SNAPSHOT"
val version2 = "10.0.0"

lazy val helloWorld1 = (project in file("helloworld1"))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
version := version1,
scalaVersion := "2.12.15",
name := "hello-world-1",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld1 = (project in file("helloworld1"))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
version := version1,
scalaVersion := "2.12.15",
name := "hello-world-1",
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))

lazy val helloWorld2 = (project in file("helloworld2"))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
version := version2,
scalaVersion := "2.12.15",
name := "hello-world-2",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.11"
)
)
lazy val helloWorld2 = (project in file("helloworld2"))
.enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin)
.settings(
version := version2,
scalaVersion := "2.12.15",
name := "hello-world-2",
libraryDependencies ++= Seq("ch.qos.logback" % "logback-classic" % "1.4.6"))

lazy val root = (project in file("root")).aggregate(helloWorld1, helloWorld2)
lazy val root = (project in file("root")).aggregate(helloWorld1, helloWorld2)

val checkVersions = taskKey[Unit]("Testing the versions of the produced apps")
checkVersions := {
Expand Down
2 changes: 1 addition & 1 deletion core/project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object Dependencies {
val airframeLog = "org.wvlet.airframe" %% "airframe-log" % "22.5.0"
val asciiTable = "de.vandermeer" % "asciitable" % "0.3.2"

val logback = "ch.qos.logback" % "logback-classic" % "1.2.11"
val logback = "ch.qos.logback" % "logback-classic" % "1.4.6"

val scalatest = "org.scalatest" %% "scalatest" % Versions.scalaTest
val scalatestMustMatchers = "org.scalatest" %% "scalatest-mustmatchers" % Versions.scalaTest
Expand Down
Loading