Use TEMP_PREFIX and JAR_SUFFIX constants in writeSignedJar

Signed-off-by: Graham <gpe@openrs2.dev>
bzip2
Graham 5 years ago
parent d006997d2d
commit 24c8c43221
  1. 4
      asm/src/main/java/dev/openrs2/asm/classpath/Library.kt

@ -94,11 +94,11 @@ class Library constructor() : Iterable<ClassNode> {
fun writeSignedJar(classPath: ClassPath, path: Path, keyStore: Pkcs12KeyStore, manifest: Manifest? = null) {
logger.info { "Writing signed jar $path" }
val unsignedPath = Files.createTempFile("tmp", ".jar")
val unsignedPath = Files.createTempFile(TEMP_PREFIX, JAR_SUFFIX)
try {
writeJar(classPath, unsignedPath, manifest)
val signedPath = Files.createTempFile("tmp", ".jar")
val signedPath = Files.createTempFile(TEMP_PREFIX, JAR_SUFFIX)
try {
keyStore.signJar(unsignedPath, signedPath)
DeterministicJarOutputStream.repack(signedPath, path)

Loading…
Cancel
Save