fix: Always make the generated patch depend on the source patch

This commit is contained in:
oSumAtrIX 2023-09-13 05:18:28 +02:00
parent a1fbb7990f
commit 8de30633ae
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

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