diff --git a/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/Compatibilities.groovy b/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/Compatibilities.groovy index 6328313b..0e2c034b 100644 --- a/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/Compatibilities.groovy +++ b/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/Compatibilities.groovy @@ -67,6 +67,10 @@ class Compatibilities { return project.tasks.findByName("merge${variant.name.capitalize()}Resources") } + static def getProcessManifestForPackageTask(project, variant) { + return project.tasks.findByName("process${variant.name.capitalize()}ManifestForPackage") + } + static def getProcessResourcesTask(project, variant) { return project.tasks.findByName("process${variant.name.capitalize()}Resources") } diff --git a/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/TinkerPatchPlugin.groovy b/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/TinkerPatchPlugin.groovy index 33a7f1d9..e5f223dd 100644 --- a/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/TinkerPatchPlugin.groovy +++ b/tinker-build/tinker-patch-gradle-plugin/src/main/groovy/com/tencent/tinker/build/gradle/TinkerPatchPlugin.groovy @@ -171,6 +171,10 @@ class TinkerPatchPlugin implements Plugin { def agpProcessResourcesTask = Compatibilities.getProcessResourcesTask(project, variant) agpProcessResourcesTask.dependsOn tinkerManifestTask + def agpProcessManifestPackageTask = Compatibilities.getProcessManifestForPackageTask(project, variant) + if (agpProcessManifestPackageTask != null) { + agpProcessManifestPackageTask.dependsOn tinkerManifestTask + } //resource id TinkerResourceIdTask applyResourceTask = mProject.tasks.create("tinkerProcess${capitalizedVariantName}ResourceId", TinkerResourceIdTask)