Skip to content

Commit bb0faad

Browse files
committed
fmt
1 parent b48618f commit bb0faad

File tree

1 file changed

+33
-24
lines changed

1 file changed

+33
-24
lines changed

src/main/scala/com/typesafe/sbt/packager/graalvmnativeimage/GraalVMNativeImagePlugin.scala

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,15 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
110110
}
111111
)
112112

113-
private def buildLocal(targetDirectory: File,
114-
binaryName: String,
115-
nativeImageCommand: String,
116-
className: String,
117-
classpathJars: Seq[File],
118-
extraOptions: Seq[String],
119-
log: ProcessLogger): File = {
113+
private def buildLocal(
114+
targetDirectory: File,
115+
binaryName: String,
116+
nativeImageCommand: String,
117+
className: String,
118+
classpathJars: Seq[File],
119+
extraOptions: Seq[String],
120+
log: ProcessLogger
121+
): File = {
120122
targetDirectory.mkdirs()
121123
val command = {
122124
val nativeImageArguments = {
@@ -126,7 +128,8 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
126128
IO.withTemporaryFile("native-image-classpath", ".txt", keepFile = true) { file =>
127129
IO.write(file, s"--class-path $classpath")
128130
Seq(s"@${file.absolutePath}")
129-
} else Seq("--class-path", classpath)
131+
}
132+
else Seq("--class-path", classpath)
130133
cpArgs ++ Seq(s"-H:Name=$binaryName") ++ extraOptions ++ Seq(className)
131134
}
132135
Seq(nativeImageCommand) ++ nativeImageArguments
@@ -138,16 +141,18 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
138141
}
139142
}
140143

141-
private def buildInDockerContainer(targetDirectory: File,
142-
binaryName: String,
143-
className: String,
144-
classpathJars: Seq[(File, String)],
145-
extraOptions: Seq[String],
146-
platformArch: Option[String],
147-
dockerCommand: Seq[String],
148-
resources: Seq[(File, String)],
149-
image: String,
150-
streams: TaskStreams): File = {
144+
private def buildInDockerContainer(
145+
targetDirectory: File,
146+
binaryName: String,
147+
className: String,
148+
classpathJars: Seq[(File, String)],
149+
extraOptions: Seq[String],
150+
platformArch: Option[String],
151+
dockerCommand: Seq[String],
152+
resources: Seq[(File, String)],
153+
image: String,
154+
streams: TaskStreams
155+
): File = {
151156
import sys.process._
152157
stage(targetDirectory, classpathJars, resources, streams)
153158

@@ -188,8 +193,10 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
188193
*
189194
* The passed in docker image must have GraalVM installed and on the PATH, including the gu utility.
190195
*/
191-
def generateContainerBuildImage(baseImage: String,
192-
platformArch: Option[String] = None): Def.Initialize[Task[Option[String]]] =
196+
def generateContainerBuildImage(
197+
baseImage: String,
198+
platformArch: Option[String] = None
199+
): Def.Initialize[Task[Option[String]]] =
193200
Def.task {
194201
import sys.process._
195202

@@ -251,10 +258,12 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
251258
Some(imageName)
252259
}
253260

254-
private def stage(targetDirectory: File,
255-
classpathJars: Seq[(File, String)],
256-
resources: Seq[(File, String)],
257-
streams: TaskStreams): File = {
261+
private def stage(
262+
targetDirectory: File,
263+
classpathJars: Seq[(File, String)],
264+
resources: Seq[(File, String)],
265+
streams: TaskStreams
266+
): File = {
258267
val stageDir = targetDirectory / "stage"
259268
val mappings = classpathJars ++ resources.map {
260269
case (resource, path) => resource -> s"resources/$path"

0 commit comments

Comments
 (0)