@@ -110,13 +110,15 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
110
110
}
111
111
)
112
112
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 = {
120
122
targetDirectory.mkdirs()
121
123
val command = {
122
124
val nativeImageArguments = {
@@ -126,7 +128,8 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
126
128
IO .withTemporaryFile(" native-image-classpath" , " .txt" , keepFile = true ) { file =>
127
129
IO .write(file, s " --class-path $classpath" )
128
130
Seq (s " @ ${file.absolutePath}" )
129
- } else Seq (" --class-path" , classpath)
131
+ }
132
+ else Seq (" --class-path" , classpath)
130
133
cpArgs ++ Seq (s " -H:Name= $binaryName" ) ++ extraOptions ++ Seq (className)
131
134
}
132
135
Seq (nativeImageCommand) ++ nativeImageArguments
@@ -138,16 +141,18 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
138
141
}
139
142
}
140
143
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 = {
151
156
import sys .process ._
152
157
stage(targetDirectory, classpathJars, resources, streams)
153
158
@@ -188,8 +193,10 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
188
193
*
189
194
* The passed in docker image must have GraalVM installed and on the PATH, including the gu utility.
190
195
*/
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 ]]] =
193
200
Def .task {
194
201
import sys .process ._
195
202
@@ -251,10 +258,12 @@ object GraalVMNativeImagePlugin extends AutoPlugin {
251
258
Some (imageName)
252
259
}
253
260
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 = {
258
267
val stageDir = targetDirectory / " stage"
259
268
val mappings = classpathJars ++ resources.map {
260
269
case (resource, path) => resource -> s " resources/ $path"
0 commit comments