Skip to content

Commit

Permalink
feat: allow custom framework path to be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Sculas committed Jun 14, 2022
1 parent 4c8eb0e commit d3a580e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/main/kotlin/app/revanced/patcher/Patcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class Patcher(private val options: PatcherOptions) {
val androlibResources = AndrolibResources().also { resources ->
resources.buildOptions = BuildOptions().also { buildOptions ->
buildOptions.aaptPath = options.aaptPath
buildOptions.frameworkFolderLocation = options.frameworkFolderLocation
buildOptions.isFramework = metaInfo.isFrameworkApk
buildOptions.resourcesAreCompressed = metaInfo.compressionType
buildOptions.doNotCompress = metaInfo.doNotCompress
Expand Down
4 changes: 3 additions & 1 deletion src/main/kotlin/app/revanced/patcher/PatcherOptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import java.io.File
* @param resourceCacheDirectory Directory to cache resources.
* @param patchResources Weather to use the resource patcher. Resources will still need to be decoded.
* @param aaptPath Optional path to a custom aapt binary.
* @param frameworkFolderLocation Optional path to a custom framework folder.
*/
data class PatcherOptions(
internal val inputFile: File,
internal val resourceCacheDirectory: String,
internal val patchResources: Boolean = false,
internal val aaptPath: String = ""
internal val aaptPath: String = "",
internal val frameworkFolderLocation: String? = null
)

0 comments on commit d3a580e

Please sign in to comment.