From 40702d9c351333674f2c3ca2a6e747d1f28a6874 Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 15 Jan 2020 23:05:41 +0000 Subject: [PATCH] Reduce Manifest duplication --- bundler/src/main/java/dev/openrs2/bundler/Bundler.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bundler/src/main/java/dev/openrs2/bundler/Bundler.kt b/bundler/src/main/java/dev/openrs2/bundler/Bundler.kt index 7ed2da65..5dfc8975 100644 --- a/bundler/src/main/java/dev/openrs2/bundler/Bundler.kt +++ b/bundler/src/main/java/dev/openrs2/bundler/Bundler.kt @@ -136,7 +136,7 @@ class Bundler @Inject constructor(publicKeyTransformer: PublicKeyTransformer) { ) private val unsignedManifest = Manifest() - private val signedManifest = Manifest() + private val signedManifest: Manifest private val APPLICATION_NAME = Attributes.Name("Application-Name") private val PERMISSIONS = Attributes.Name("Permissions") @@ -145,8 +145,7 @@ class Bundler @Inject constructor(publicKeyTransformer: PublicKeyTransformer) { unsignedManifest.mainAttributes[APPLICATION_NAME] = "OpenRS2" unsignedManifest.mainAttributes[PERMISSIONS] = "sandbox" - signedManifest.mainAttributes[MANIFEST_VERSION] = "1.0" - signedManifest.mainAttributes[APPLICATION_NAME] = "OpenRS2" + signedManifest = Manifest(unsignedManifest) signedManifest.mainAttributes[PERMISSIONS] = "all-permissions" } }