feat: allow custom framework path to be specified

This commit is contained in:
Lucaskyy 2022-06-14 17:49:07 +02:00
parent 4c8eb0e5c7
commit d3a580ea19
No known key found for this signature in database
GPG key ID: 1530BFF96D1EEB89
2 changed files with 4 additions and 1 deletions

View file

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

View file

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