Skip to content

Commit

Permalink
feat: return a File instance instead of ExtFile
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Jun 22, 2022
1 parent d05c941 commit 68174bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/app/revanced/patcher/Patcher.kt
Expand Up @@ -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)
Expand Down Expand Up @@ -178,7 +178,7 @@ class Patcher(private val options: PatcherOptions) {
null, includedFiles
)

resourceFile = ExtFile(aaptFile)
resourceFile = aaptFile
}

val newDexFile = object : DexFile {
Expand Down
5 changes: 3 additions & 2 deletions src/main/kotlin/app/revanced/patcher/PatcherResult.kt
Expand Up @@ -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?
)

0 comments on commit 68174bb

Please sign in to comment.