|
|
@ -32,12 +32,12 @@ class DeterministicJarOutputStream : JarOutputStream { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun repack(src: Path, dest: Path) { |
|
|
|
fun repack(src: Path, dest: Path) { |
|
|
|
JarInputStream(Files.newInputStream(src)).use { `in` -> |
|
|
|
JarInputStream(Files.newInputStream(src)).use { input -> |
|
|
|
create(Files.newOutputStream(dest), `in`.manifest).use { out -> |
|
|
|
create(Files.newOutputStream(dest), input.manifest).use { output -> |
|
|
|
while (true) { |
|
|
|
while (true) { |
|
|
|
val entry = `in`.nextJarEntry ?: break |
|
|
|
val entry = input.nextJarEntry ?: break |
|
|
|
out.putNextEntry(entry) |
|
|
|
output.putNextEntry(entry) |
|
|
|
`in`.copyTo(out) |
|
|
|
input.copyTo(output) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|