From 68174bbd6b4df47a91b610c2b97dbae55b594163 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 22 Jun 2022 02:53:37 +0200 Subject: [PATCH] feat: return a `File` instance instead of `ExtFile` --- src/main/kotlin/app/revanced/patcher/Patcher.kt | 4 ++-- src/main/kotlin/app/revanced/patcher/PatcherResult.kt | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/app/revanced/patcher/Patcher.kt b/src/main/kotlin/app/revanced/patcher/Patcher.kt index 6a0320cd..b10cbb66 100644 --- a/src/main/kotlin/app/revanced/patcher/Patcher.kt +++ b/src/main/kotlin/app/revanced/patcher/Patcher.kt @@ -137,7 +137,7 @@ class Patcher(private val options: PatcherOptions) { fun save(): PatcherResult { val packageMetadata = data.packageMetadata val metaInfo = packageMetadata.metaInfo - var resourceFile: ExtFile? = null + var resourceFile: File? = null if (options.patchResources) { val cacheDirectory = ExtFile(options.resourceCacheDirectory) @@ -178,7 +178,7 @@ class Patcher(private val options: PatcherOptions) { null, includedFiles ) - resourceFile = ExtFile(aaptFile) + resourceFile = aaptFile } val newDexFile = object : DexFile { diff --git a/src/main/kotlin/app/revanced/patcher/PatcherResult.kt b/src/main/kotlin/app/revanced/patcher/PatcherResult.kt index 0c321f8b..0ed39687 100644 --- a/src/main/kotlin/app/revanced/patcher/PatcherResult.kt +++ b/src/main/kotlin/app/revanced/patcher/PatcherResult.kt @@ -2,15 +2,16 @@ package app.revanced.patcher import app.revanced.patcher.util.dex.DexFile import brut.directory.ExtFile +import java.io.File /** * The result of a patcher. * @param dexFiles The patched dex files. * @param doNotCompress List of relative paths to files to exclude from compressing. - * @param resourceFile ExtFile containing resources that need to be extracted into the APK. + * @param resourceFile File containing resources that need to be extracted into the APK. */ data class PatcherResult( val dexFiles: List, val doNotCompress: List? = null, - val resourceFile: ExtFile? + val resourceFile: File? ) \ No newline at end of file