chore: merge branch dev to main (#222)

This commit is contained in:
oSumAtrIX 2023-08-27 02:53:47 +02:00 committed by GitHub
commit 8d0dd9c448
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 2 deletions

View file

@ -1,3 +1,24 @@
# [14.2.0-dev.3](https://github.com/ReVanced/revanced-patcher/compare/v14.2.0-dev.2...v14.2.0-dev.3) (2023-08-26)
### Performance Improvements
* compare types of classes ([55d6945](https://github.com/ReVanced/revanced-patcher/commit/55d694579ac2718b9e2c61ca5f38419c3775ef87))
# [14.2.0-dev.2](https://github.com/ReVanced/revanced-patcher/compare/v14.2.0-dev.1...v14.2.0-dev.2) (2023-08-26)
### Features
* log when merging integrations ([983563e](https://github.com/ReVanced/revanced-patcher/commit/983563efb6d7c8d289464b8bf71a016b8a735630))
# [14.2.0-dev.1](https://github.com/ReVanced/revanced-patcher/compare/v14.1.0...v14.2.0-dev.1) (2023-08-25)
### Features
* load patches in lexicographical order ([e8f2087](https://github.com/ReVanced/revanced-patcher/commit/e8f2087a6ffa6077fb3a6a69e29f3aec72e2fc1b))
# [14.1.0](https://github.com/ReVanced/revanced-patcher/compare/v14.0.0...v14.1.0) (2023-08-24)

View file

@ -33,6 +33,10 @@ tasks {
kotlin { jvmToolchain(11) }
java {
withSourcesJar()
}
publishing {
repositories {
mavenLocal()

View file

@ -1,4 +1,4 @@
org.gradle.parallel = true
org.gradle.caching = true
kotlin.code.style = official
version = 14.1.0
version = 14.2.0-dev.3

View file

@ -3,6 +3,7 @@
package app.revanced.patcher
import app.revanced.patcher.extensions.AnnotationExtensions.findAnnotationRecursively
import app.revanced.patcher.extensions.PatchExtensions.patchName
import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.PatchClass
import dalvik.system.DexClassLoader
@ -28,6 +29,8 @@ sealed class PatchBundleLoader private constructor(
}.map {
@Suppress("UNCHECKED_CAST")
it as PatchClass
}.sortedBy {
it.patchName
}.let { addAll(it) }
}

View file

@ -107,6 +107,9 @@ class BytecodeContext internal constructor(private val options: PatcherOptions)
override fun flush() {
if (!merge) return
logger.info("Merging integrations")
// TODO: Multi-thread this.
this@Integrations.forEach { integrations ->
MultiDexIO.readDexFile(
true,
@ -114,7 +117,7 @@ class BytecodeContext internal constructor(private val options: PatcherOptions)
null,
null
).classes.forEach classDef@{ classDef ->
val existingClass = classes.find { it == classDef } ?: run {
val existingClass = classes.find { it.type == classDef.type } ?: run {
logger.fine("Merging $classDef")
classes.add(classDef)
return@classDef