File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,22 @@ tasks.register<Download>("downloadJDK") {
125125 " $imageType /" +
126126 " hotspot/normal/eclipse?project=jdk" )
127127
128- dest(layout.buildDirectory.file(" jdk-$platform -$arch .tar.gz" ))
128+ val extension = if (os.isWindows) " zip" else " tar.gz"
129+ dest(layout.buildDirectory.file(" jdk-$platform -$arch .$extension " ))
129130 overwrite(false )
130131}
131132tasks.register<Copy >(" unzipJDK" ) {
132133 val dl = tasks.findByPath(" downloadJDK" ) as Download
133134 dependsOn(dl)
134- from(tarTree(dl.dest))
135+
136+ val os: OperatingSystem = DefaultNativePlatform .getCurrentOperatingSystem()
137+ val archive = if (os.isWindows) {
138+ zipTree(dl.dest)
139+ } else {
140+ tarTree(dl.dest)
141+ }
142+
143+ from(archive)
135144 into(layout.buildDirectory.dir(" resources-bundled/common" ))
136145}
137146afterEvaluate {
You can’t perform that action at this time.
0 commit comments