mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-04 22:44:24 +02:00
fix: Always make the generated patch depend on the source patch
This commit is contained in:
parent
a1fbb7990f
commit
8de30633ae
@ -154,18 +154,18 @@ class PatchProcessor(
|
||||
)
|
||||
}
|
||||
|
||||
patchAnnotation.dependencies?.let { dependencies ->
|
||||
addSuperclassConstructorParameter(
|
||||
"dependencies = setOf(%L, %L)",
|
||||
buildList {
|
||||
addAll(dependencies)
|
||||
}.joinToString(", ") { dependency ->
|
||||
"${(dependencyResolutionMap[dependency] ?: dependency)}::class"
|
||||
},
|
||||
// Also add the source class of the generated class so that it is also executed.
|
||||
"${patchDeclaration.toClassName()}::class"
|
||||
)
|
||||
}
|
||||
// The generated patch always depends on the source patch.
|
||||
addSuperclassConstructorParameter(
|
||||
"dependencies = setOf(%L)",
|
||||
buildList {
|
||||
patchAnnotation.dependencies?.forEach { dependency ->
|
||||
add("${(dependencyResolutionMap[dependency] ?: dependency)}::class")
|
||||
}
|
||||
|
||||
add("${patchDeclaration.toClassName()}::class")
|
||||
}.joinToString(", "),
|
||||
)
|
||||
|
||||
addSuperclassConstructorParameter(
|
||||
"use = %L", patchAnnotation.use
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user