mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-05 06:44:25 +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 ->
|
// The generated patch always depends on the source patch.
|
||||||
addSuperclassConstructorParameter(
|
addSuperclassConstructorParameter(
|
||||||
"dependencies = setOf(%L, %L)",
|
"dependencies = setOf(%L)",
|
||||||
buildList {
|
buildList {
|
||||||
addAll(dependencies)
|
patchAnnotation.dependencies?.forEach { dependency ->
|
||||||
}.joinToString(", ") { dependency ->
|
add("${(dependencyResolutionMap[dependency] ?: dependency)}::class")
|
||||||
"${(dependencyResolutionMap[dependency] ?: dependency)}::class"
|
}
|
||||||
},
|
|
||||||
// Also add the source class of the generated class so that it is also executed.
|
add("${patchDeclaration.toClassName()}::class")
|
||||||
"${patchDeclaration.toClassName()}::class"
|
}.joinToString(", "),
|
||||||
)
|
)
|
||||||
}
|
|
||||||
addSuperclassConstructorParameter(
|
addSuperclassConstructorParameter(
|
||||||
"use = %L", patchAnnotation.use
|
"use = %L", patchAnnotation.use
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user