Skip to content

Commit

Permalink
Merge pull request #141 from Philippus/fix-deprecation-warnings
Browse files Browse the repository at this point in the history
Fix/silence deprecation warnings and update dependencies
  • Loading branch information
marcus-drake authored Dec 12, 2024
2 parents 2a20638 + 18e82f9 commit a047627
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ lazy val root = (project in file("."))
)

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.11" % "test",
"org.apache.commons" % "commons-lang3" % "3.12.0"
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"org.apache.commons" % "commons-text" % "1.11.0"
)

scalacOptions := Seq("-deprecation", "-unchecked", "-feature")
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.2
sbt.version=1.10.5
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
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")
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")
5 changes: 4 additions & 1 deletion src/main/scala/sbtdocker/DockerSettings.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
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
Expand Down Expand Up @@ -68,7 +71,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(
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/sbtdocker/DockerTag.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/sbtdocker/Instructions.scala
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a047627

Please sign in to comment.