Use TEMP_PREFIX and JAR_SUFFIX constants in writeSignedJar

Signed-off-by: Graham <gpe@openrs2.dev>
pull/102/head
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) { fun writeSignedJar(classPath: ClassPath, path: Path, keyStore: Pkcs12KeyStore, manifest: Manifest? = null) {
logger.info { "Writing signed jar $path" } logger.info { "Writing signed jar $path" }
val unsignedPath = Files.createTempFile("tmp", ".jar") val unsignedPath = Files.createTempFile(TEMP_PREFIX, JAR_SUFFIX)
try { try {
writeJar(classPath, unsignedPath, manifest) writeJar(classPath, unsignedPath, manifest)
val signedPath = Files.createTempFile("tmp", ".jar") val signedPath = Files.createTempFile(TEMP_PREFIX, JAR_SUFFIX)
try { try {
keyStore.signJar(unsignedPath, signedPath) keyStore.signJar(unsignedPath, signedPath)
DeterministicJarOutputStream.repack(signedPath, path) DeterministicJarOutputStream.repack(signedPath, path)

Loading…
Cancel
Save