mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-02 14:04:24 +02:00
fix: enforce aapt v2
This commit is contained in:
parent
8ce3535427
commit
b68b0bf3d7
@ -51,10 +51,7 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
if (outDir.exists()) outDir.deleteRecursively()
|
if (outDir.exists()) outDir.deleteRecursively()
|
||||||
outDir.mkdirs()
|
outDir.mkdirs()
|
||||||
|
|
||||||
val androlib = Androlib(BuildOptions().also { buildOptions ->
|
val androlib = Androlib(BuildOptions().also { it.setBuildOptions(options) })
|
||||||
buildOptions.aaptPath = options.aaptPath
|
|
||||||
buildOptions.frameworkFolderLocation = options.frameworkFolderLocation
|
|
||||||
})
|
|
||||||
val resourceTable = androlib.getResTable(extInputFile, true)
|
val resourceTable = androlib.getResTable(extInputFile, true)
|
||||||
|
|
||||||
val packageMetadata = PackageMetadata()
|
val packageMetadata = PackageMetadata()
|
||||||
@ -146,8 +143,7 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
|
|
||||||
val androlibResources = AndrolibResources().also { resources ->
|
val androlibResources = AndrolibResources().also { resources ->
|
||||||
resources.buildOptions = BuildOptions().also { buildOptions ->
|
resources.buildOptions = BuildOptions().also { buildOptions ->
|
||||||
buildOptions.aaptPath = options.aaptPath
|
buildOptions.setBuildOptions(options)
|
||||||
buildOptions.frameworkFolderLocation = options.frameworkFolderLocation
|
|
||||||
buildOptions.isFramework = metaInfo.isFrameworkApk
|
buildOptions.isFramework = metaInfo.isFrameworkApk
|
||||||
buildOptions.resourcesAreCompressed = metaInfo.compressionType
|
buildOptions.resourcesAreCompressed = metaInfo.compressionType
|
||||||
buildOptions.doNotCompress = metaInfo.doNotCompress
|
buildOptions.doNotCompress = metaInfo.doNotCompress
|
||||||
@ -299,3 +295,9 @@ class Patcher(private val options: PatcherOptions) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun BuildOptions.setBuildOptions(options: PatcherOptions) {
|
||||||
|
this.aaptPath = options.aaptPath
|
||||||
|
this.useAapt2 = true
|
||||||
|
this.frameworkFolderLocation = options.frameworkFolderLocation
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user