Skip to content

Commit

Permalink
remove more parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
jtjeferreira committed Oct 10, 2024
1 parent 7732d4d commit b2dd90c
Show file tree
Hide file tree
Showing 24 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion src/sbt-test/bash/absolute-path-in-bash/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name := "absolute-path-in-bash"

version := "0.1.0"

(bashScriptDefines / scriptClasspath) ++= Seq("/dummy/absolute/path", "relative/path")
bashScriptDefines / scriptClasspath ++= Seq("/dummy/absolute/path", "relative/path")

TaskKey[Unit]("runCheck") := {
val dir = (Universal / stagingDirectory).value
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/bash/java-home-var-expansion/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name := "java-home-override"

version := "0.1.0"

(Universal / javaOptions) ++= Seq("-java-home ${app_home}/../jre")
Universal / javaOptions ++= Seq("-java-home ${app_home}/../jre")

TaskKey[Unit]("runCheck") := {
val cwd = (Universal / stagingDirectory).value
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/bash/memory-settings/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name := "simple-app"

version := "0.1.0"

(Universal / javaOptions) ++= Seq("-J-Xmx64m", "-J-Xms64m")
Universal / javaOptions ++= Seq("-J-Xmx64m", "-J-Xms64m")

TaskKey[Unit]("jvmoptsCheck") := {
val jvmopts = (Universal / stagingDirectory).value / "conf" / "application.ini"
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/debian/gen-changes/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"

(Debian / debianChangelog) := Some(file("debian/changelog"))
4 changes: 2 additions & 2 deletions src/sbt-test/debian/java-app-archetype/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"

TaskKey[Unit]("checkScript") := {
val dir = (Universal / stagingDirectory).value
Expand Down
8 changes: 4 additions & 4 deletions src/sbt-test/debian/jdeb-dir-mappings/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"

(Debian / linuxPackageMappings) += packageDirectoryAndContentsMapping(
Debian / linuxPackageMappings += packageDirectoryAndContentsMapping(
(baseDirectory.value / "src" / "resources" / "conf") -> "/usr/share/conf"
)

(Debian / linuxPackageMappings) += packageDirectoryAndContentsMapping(
Debian / linuxPackageMappings += packageDirectoryAndContentsMapping(
(baseDirectory.value / "src" / "resources" / "empty") -> "/var/empty"
)

Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/debian/jdeb-script-replacements/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"

TaskKey[Unit]("checkControlFiles") := {
val header = "#!/bin/sh"
Expand Down
8 changes: 4 additions & 4 deletions src/sbt-test/debian/simple-deb/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageConflicts) += "debian-other-test-package"
Debian / debianPackageConflicts += "debian-other-test-package"

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageProvides) += "debian-test-package"
Debian / debianPackageProvides += "debian-test-package"

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"
8 changes: 4 additions & 4 deletions src/sbt-test/debian/simple-jdeb/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageConflicts) += "debian-other-test-package"
Debian / debianPackageConflicts += "debian-other-test-package"

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageProvides) += "debian-test-package"
Debian / debianPackageProvides += "debian-test-package"

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"
2 changes: 1 addition & 1 deletion src/sbt-test/debian/systemd-deb/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ packageDescription := """A fun package description of our software,

(Linux / daemonUser) := "testuser"

(Debian / systemdSuccessExitStatus) += "1"
Debian / systemdSuccessExitStatus += "1"

TaskKey[Unit]("checkStartupScript") := {
val script = IO.read(target.value / "debian-test-0.1.0" / "lib" / "systemd" / "system" / "debian-test.service")
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/debian/test-executableScriptName/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"

TaskKey[Unit]("checkUpstartScript") := {
val script = IO.read(target.value / "debian-test-0.1.0" / "etc" / "init" / "debian-test.conf")
Expand Down
6 changes: 3 additions & 3 deletions src/sbt-test/debian/test-mapping-helpers/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ packageDescription := """A fun package description of our software,

// linuxPackageMappings in Debian += packageTemplateMapping("/var/run/debian") // not work
// linuxPackageMappings in Debian += packageTemplateMapping("/var/run/debian")() // not work
(Debian / linuxPackageMappings) += packageTemplateMapping(Seq("/opt/test/other"): _*)()
Debian / linuxPackageMappings += packageTemplateMapping(Seq("/opt/test/other"): _*)()

(Debian / linuxPackageMappings) += {
Debian / linuxPackageMappings += {
packageTemplateMapping("/opt/test/" + Keys.normalizedName.value)(target.value)
}

// Consider using mappings in Universal
(Debian / linuxPackageMappings) += packageDirectoryAndContentsMapping(
Debian / linuxPackageMappings += packageDirectoryAndContentsMapping(
(baseDirectory.value / "src" / "resources" / "conf") -> "/usr/share/conf"
)
4 changes: 2 additions & 2 deletions src/sbt-test/debian/test-mapping/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"

TaskKey[Unit]("checkControlScript") := {
val script =
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/debian/test-packageName/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ packageSummary := "Test debian package"
packageDescription := """A fun package description of our software,
with multiple lines."""

(Debian / debianPackageDependencies) ++= Seq("java2-runtime", "bash (>= 2.05a-11)")
Debian / debianPackageDependencies ++= Seq("java2-runtime", "bash (>= 2.05a-11)")

(Debian / debianPackageRecommends) += "git"
Debian / debianPackageRecommends += "git"

TaskKey[Unit]("checkControlScript") := {
val script =
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/docker/build-command/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ name := "docker-build-command-test"
version := "0.1.0"

import NativePackagerHelper._
(Docker / mappings) ++= directory("src/main/resources/docker-test")
Docker / mappings ++= directory("src/main/resources/docker-test")
dockerBuildCommand := Seq("docker", "build", "-t", "docker-build-command-test:0.1.0", "docker-test/")
2 changes: 1 addition & 1 deletion src/sbt-test/docker/test-layer-groups/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ organization := "com.example"
name := "docker-groups"
version := "0.1.0"

(Docker / dockerPackageMappings) ++= Seq(
Docker / dockerPackageMappings ++= Seq(
(baseDirectory.value / "docker" / "spark-env.sh") -> "/opt/docker/spark/spark-env.sh",
(baseDirectory.value / "docker" / "log4j.properties") -> "/opt/docker/other/log4j.properties"
)
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/jdkpackager/test-package-mappings/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ packageDescription := "Test JDKPackagerPlugin with mappings"

jdkPackagerType := "image"

(Universal / mappings) += baseDirectory.value / "src" / "deploy" / "README.md" -> "README.md"
Universal / mappings += baseDirectory.value / "src" / "deploy" / "README.md" -> "README.md"

(Universal / mappings) ++= {
Universal / mappings ++= {
val dir = baseDirectory.value / "src" / "deploy" / "stuff"
(dir.**(AllPassFilter) --- dir) pair (file => IO.relativize(dir.getParentFile, file))
}
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/jlink/test-jlink-misc/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ val issue1243 = project
val issue1247BadAutoModuleName = project
.enablePlugins(JlinkPlugin)
.settings(
(Compile / managedClasspath) += {
Compile / managedClasspath += {
// Build an empty jar with an unsupported name
val jarFile = target.value / "foo_2.11.jar"
IO.jar(Nil, jarFile, new java.util.jar.Manifest)
Expand Down Expand Up @@ -72,7 +72,7 @@ val issue1266 = project
libraryDependencies += "com.sun.xml.fastinfoset" % "FastInfoset" % "1.2.16",
// A lot of "dummy" dependencies, so that the resulting classpath is over
// the command line limit (2MB on my machine)
(Compile / unmanagedJars) ++= {
Compile / unmanagedJars ++= {
def mkPath(ix: Int) = target.value / s"there-is-no-such-file-$ix.jar"

1.to(300000).map(mkPath)
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/universal/absolute-path/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ name := "absolute-path"

version := "0.1.0"

(bashScriptDefines / scriptClasspath) ++= Seq("/dummy/absolute/path", "relative/path")
bashScriptDefines / scriptClasspath ++= Seq("/dummy/absolute/path", "relative/path")

(batScriptReplacements / scriptClasspath) ++= Seq("x:\\dummy\\absolute\\path", "relative\\path")
batScriptReplacements / scriptClasspath ++= Seq("x:\\dummy\\absolute\\path", "relative\\path")

TaskKey[Unit]("check") := {
val dir = (Universal / stagingDirectory).value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name := "simple-test"

version := "0.1.0"

(Universal / javaOptions) ++= Seq("-J-Xmx64m", "-J-Xms64m", "-Dproperty=true")
Universal / javaOptions ++= Seq("-J-Xmx64m", "-J-Xms64m", "-Dproperty=true")

TaskKey[Unit]("check") := {
val application = (Universal / target).value / "tmp" / "conf" / "application.ini"
Expand Down
6 changes: 3 additions & 3 deletions src/sbt-test/universal/test-mapping-helpers/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ name := "simple-test"
version := "0.1.0"

// or just place your cache folder in /src/universal/
(Universal / mappings) ++= directory("src/main/resources/cache")
Universal / mappings ++= directory("src/main/resources/cache")

// or just place your cache folder in /src/universal/
(Universal / mappings) ++= contentOf("src/main/resources/docs")
Universal / mappings ++= contentOf("src/main/resources/docs")

(Universal / mappings) += {
Universal / mappings += {
(Compile / packageBin).value
// we are using the reference.conf as default application.conf
// the user can override settings here
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/windows/absolute-path-in-bat/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name := "absolute-path-in-bat"

version := "0.1.0"

(batScriptReplacements / scriptClasspath) ++= Seq("x:\\dummy\\absolute\\path", "relative\\path")
batScriptReplacements / scriptClasspath ++= Seq("x:\\dummy\\absolute\\path", "relative\\path")

TaskKey[Unit]("runCheck") := {
val dir = (Universal / stagingDirectory).value
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/windows/memory-settings/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name := "simple-app"

version := "0.1.0"

(Universal / javaOptions) ++= Seq("-J-Xmx64m", "-J-Xms64m")
Universal / javaOptions ++= Seq("-J-Xmx64m", "-J-Xms64m")

TaskKey[Unit]("jvmoptsCheck") := {
val jvmopts = (Universal / stagingDirectory).value / "conf" / "application.ini"
Expand Down
2 changes: 1 addition & 1 deletion src/sphinx/formats/universal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ You can also use the following approach if, for example, you need more flexibili

.. code-block:: scala
(Universal / mappings) ++= {
Universal / mappings ++= {
val dir = target.value / "scala-2.10" / "api"
(dir ** AllPassFilter) pair relativeTo(dir.getParentFile)
}
Expand Down

0 comments on commit b2dd90c

Please sign in to comment.