Skip to content

Commit

Permalink
[play] :: migrate to slash syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinovega committed Nov 8, 2023
1 parent 71f891e commit 7acd913
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions daikoku/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.typesafe.sbt.packager.docker.DockerPermissionStrategy
name := """daikoku"""
organization := "fr.maif.otoroshi"
maintainer := "[email protected]"
packageName in Universal := "daikoku"
Universal / packageName := "daikoku"

scalaVersion := "2.13.1"

Expand All @@ -20,9 +20,9 @@ lazy val root = (project in file("."))
buildInfoPackage := "daikoku"
)

javaOptions in Test += "-Dconfig.file=conf/application.test.conf"
Test / javaOptions += "-Dconfig.file=conf/application.test.conf"

assemblyMergeStrategy in assembly := {
assembly / assemblyMergeStrategy := {
case PathList("org", "apache", "commons", "logging", xs @ _*) =>
MergeStrategy.first
case PathList(ps @ _*) if ps.contains("module-info.class") =>
Expand All @@ -38,7 +38,7 @@ assemblyMergeStrategy in assembly := {
case "META-INF/mailcap.default" => MergeStrategy.last
case "META-INF/mimetypes.default" => MergeStrategy.last
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}

Expand Down Expand Up @@ -120,11 +120,11 @@ PlayKeys.devSettings := Seq("play.server.http.port" -> "9000")

/// ASSEMBLY CONFIG

mainClass in assembly := Some("play.core.server.ProdServerStart")
test in assembly := {}
assemblyJarName in assembly := "daikoku.jar"
fullClasspath in assembly += Attributed.blank(PlayKeys.playPackageAssets.value)
assemblyMergeStrategy in assembly := {
assembly / mainClass := Some("play.core.server.ProdServerStart")
assembly / test := {}
assembly / assemblyJarName := "daikoku.jar"
assembly / fullClasspath += Attributed.blank(PlayKeys.playPackageAssets.value)
assembly / assemblyMergeStrategy := {
//case PathList("META-INF", xs @ _*) => MergeStrategy.discard
case PathList("javax", xs @ _*) =>
MergeStrategy.first
Expand All @@ -142,31 +142,31 @@ assemblyMergeStrategy in assembly := {
case PathList(ps @ _*) if ps.contains("buildinfo") =>
MergeStrategy.discard
case o =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(o)
}

lazy val packageAll = taskKey[Unit]("PackageAll")
packageAll := {
(dist in Compile).value
(assembly in Compile).value
(Compile / dist).value
(Compile / assembly).value
}

/// DOCKER CONFIG

dockerExposedPorts := Seq(
8080
)
packageName in Docker := "daikoku"
maintainer in Docker := "MAIF OSS Team <[email protected]>"
Docker / packageName := "daikoku"
Docker / maintainer := "MAIF OSS Team <[email protected]>"
dockerBaseImage := "eclipse-temurin:11.0.13_8-jre-focal"
dockerUsername := Some("maif")
dockerUpdateLatest := true
dockerCommands := dockerCommands.value.filterNot {
case ExecCmd("CMD", args @ _*) => true
case cmd => false
}
dockerPackageMappings in Docker += (baseDirectory.value / "docker" / "start.sh") -> "/opt/docker/bin/start.sh"
Docker / dockerPackageMappings += (baseDirectory.value / "docker" / "start.sh") -> "/opt/docker/bin/start.sh"
dockerEntrypoint := Seq("/opt/docker/bin/start.sh")
dockerUpdateLatest := true

Expand Down
2 changes: 1 addition & 1 deletion daikoku/version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "16.4.0-dev"
ThisBuild / version := "16.4.0-dev"

0 comments on commit 7acd913

Please sign in to comment.