mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01:00
feat: return a File
instance instead of ExtFile
This commit is contained in:
parent
d05c9416d6
commit
68174bbd6b
2 changed files with 5 additions and 4 deletions
|
@ -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 {
|
||||
|
|
|
@ -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?
|
||||
)
|
Loading…
Reference in a new issue