From 558710bbdd5ba9c462d496d311d6004162164579 Mon Sep 17 00:00:00 2001 From: vvb2060 Date: Wed, 29 Dec 2021 17:09:59 +0800 Subject: [PATCH] Fix gradle task dependencies --- buildSrc/src/main/java/Setup.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Setup.kt b/buildSrc/src/main/java/Setup.kt index 75e623323..1d5c62d47 100644 --- a/buildSrc/src/main/java/Setup.kt +++ b/buildSrc/src/main/java/Setup.kt @@ -184,6 +184,8 @@ fun Project.setupStub() { val apkTmp = File("${apk}.tmp") val genManifestTask = tasks.register("generate${variantCapped}ObfuscatedManifest") { + inputs.property("versionCode", Config.versionCode) + outputs.file(manifest) doLast { val xml = genStubManifest(templateDir, outSrcDir) manifest.parentFile.mkdirs() @@ -192,10 +194,12 @@ fun Project.setupStub() { } } } - mergeResourcesProvider.get().dependsOn(genManifestTask) + tasks.getByPath(":stub:process${variantCapped}MainManifest").dependsOn(genManifestTask) val genSrcTask = tasks.register("generate${variantCapped}ObfuscatedSources") { dependsOn(":stub:process${variantCapped}Resources") + inputs.file(apk) + outputs.file(apk) doLast { exec { commandLine(aapt, "optimize", "-o", apkTmp, "--collapse-resource-names", apk)