feat: return a File instance instead of ExtFile

This commit is contained in:
oSumAtrIX 2022-06-22 02:53:37 +02:00
parent d05c9416d6
commit 68174bbd6b
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4
2 changed files with 5 additions and 4 deletions

View file

@ -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 {

View file

@ -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<DexFile>,
val doNotCompress: List<String>? = null,
val resourceFile: ExtFile?
val resourceFile: File?
)