From f93d47e037554639beffd9dd9f53d6f4913834f8 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:47:50 +0100 Subject: [PATCH 1/9] Replace lines with lineStream --- src/main/scala/sbtdocker/DockerTag.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/sbtdocker/DockerTag.scala b/src/main/scala/sbtdocker/DockerTag.scala index 6a70276..c3c59b1 100644 --- a/src/main/scala/sbtdocker/DockerTag.scala +++ b/src/main/scala/sbtdocker/DockerTag.scala @@ -20,7 +20,7 @@ object DockerTag { val command = dockerPath :: "tag" :: id.id :: name.toString :: Nil - val processOutput = Process(command).lines(processLogger) + val processOutput = Process(command).lineStream(processLogger) processOutput.foreach { line => log.info(line) } From 4922b6890d5d3c43f7713d76bea6a8b89e698323 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:48:28 +0100 Subject: [PATCH 2/9] Migrate to slash syntax --- src/main/scala/sbtdocker/DockerSettings.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/sbtdocker/DockerSettings.scala b/src/main/scala/sbtdocker/DockerSettings.scala index 2bcd7fc..3d3e374 100644 --- a/src/main/scala/sbtdocker/DockerSettings.scala +++ b/src/main/scala/sbtdocker/DockerSettings.scala @@ -68,7 +68,7 @@ object DockerSettings { (docker / Keys.mainClass).or(Compile / Keys.packageBin / Keys.mainClass).value }, docker / dockerfile := { - val maybeMainClass = Keys.mainClass.in(docker).value + val maybeMainClass = (docker / Keys.mainClass).value maybeMainClass match { case None => sys.error( From 16441ace074eb09dd95b0f1e65723d0cbeae38a8 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:49:14 +0100 Subject: [PATCH 3/9] Silence deprecation warnings about imageName --- src/main/scala/sbtdocker/DockerSettings.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/sbtdocker/DockerSettings.scala b/src/main/scala/sbtdocker/DockerSettings.scala index 3d3e374..9f619d2 100644 --- a/src/main/scala/sbtdocker/DockerSettings.scala +++ b/src/main/scala/sbtdocker/DockerSettings.scala @@ -1,12 +1,14 @@ package sbtdocker +import scala.annotation.nowarn + import sbt.Keys.target import sbt._ import sbtdocker.DockerKeys._ import sbtdocker.staging.DefaultDockerfileProcessor object DockerSettings { - + @nowarn("msg=value imageName in object DockerKeys is deprecated") lazy val baseDockerSettings = Seq( docker := { val log = Keys.streams.value.log From 7354424ecff03671f1421d7fa578fc5832501263 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:49:54 +0100 Subject: [PATCH 4/9] Replace deprecated StringEscapeUtils --- build.sbt | 2 +- src/main/scala/sbtdocker/Instructions.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index a8510d0..a2af33a 100644 --- a/build.sbt +++ b/build.sbt @@ -13,7 +13,7 @@ lazy val root = (project in file(".")) libraryDependencies ++= Seq( "org.scalatest" %% "scalatest" % "3.2.11" % "test", - "org.apache.commons" % "commons-lang3" % "3.12.0" + "org.apache.commons" % "commons-text" % "1.11.0" ) scalacOptions := Seq("-deprecation", "-unchecked", "-feature") diff --git a/src/main/scala/sbtdocker/Instructions.scala b/src/main/scala/sbtdocker/Instructions.scala index 23ab0cc..e1a0d57 100644 --- a/src/main/scala/sbtdocker/Instructions.scala +++ b/src/main/scala/sbtdocker/Instructions.scala @@ -1,6 +1,6 @@ package sbtdocker -import org.apache.commons.lang3.StringEscapeUtils +import org.apache.commons.text.StringEscapeUtils import sbtdocker.staging.SourceFile import scala.concurrent.duration.FiniteDuration From 5c063dff8e3c4c739e0574f876f42d15749b44a5 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:51:00 +0100 Subject: [PATCH 5/9] Update sbt to 1.10.5 --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 46e43a9..db1723b 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.2 +sbt.version=1.10.5 From a5efbb874c4237e398bc7e162acde63c0d3c52c5 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:52:38 +0100 Subject: [PATCH 6/9] Update scalatest to 3.2.19 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index a2af33a..a745f92 100644 --- a/build.sbt +++ b/build.sbt @@ -12,7 +12,7 @@ lazy val root = (project in file(".")) ) libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.2.11" % "test", + "org.scalatest" %% "scalatest" % "3.2.19" % "test", "org.apache.commons" % "commons-text" % "1.11.0" ) From ba3a219c783ffe239076bc65fabac67e24049a54 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:53:06 +0100 Subject: [PATCH 7/9] Update sbt-release to 1.4.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index fa17b65..cdac7b6 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") From 2f829ee257c52928f45ec7f63d1b79b6e1909403 Mon Sep 17 00:00:00 2001 From: philippus Date: Sun, 10 Nov 2024 09:53:24 +0100 Subject: [PATCH 8/9] Update sbt-pgp to 2.3.0 --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index cdac7b6..3a14199 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") From 18e82f96357e5d9ea6b394c4c421a1b0ad00632f Mon Sep 17 00:00:00 2001 From: philippus Date: Tue, 12 Nov 2024 01:24:29 +0100 Subject: [PATCH 9/9] Update sbt-scalafmt to 2.5.2 --- project/plugins.sbt | 2 +- src/main/scala/sbtdocker/DockerSettings.scala | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 3a14199..f82b7f8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,4 +2,4 @@ addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") diff --git a/src/main/scala/sbtdocker/DockerSettings.scala b/src/main/scala/sbtdocker/DockerSettings.scala index 9f619d2..60708ba 100644 --- a/src/main/scala/sbtdocker/DockerSettings.scala +++ b/src/main/scala/sbtdocker/DockerSettings.scala @@ -8,6 +8,7 @@ import sbtdocker.DockerKeys._ import sbtdocker.staging.DefaultDockerfileProcessor object DockerSettings { + @nowarn("msg=value imageName in object DockerKeys is deprecated") lazy val baseDockerSettings = Seq( docker := {