From 4af72324f46525ee0d04988dce5745fd6ac4ce07 Mon Sep 17 00:00:00 2001 From: LoveSy Date: Fri, 3 Mar 2023 15:50:25 +0800 Subject: [PATCH] Fix gradle cache --- buildSrc/src/main/java/Setup.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/Setup.kt b/buildSrc/src/main/java/Setup.kt index 08b965753..4f855727c 100644 --- a/buildSrc/src/main/java/Setup.kt +++ b/buildSrc/src/main/java/Setup.kt @@ -344,7 +344,6 @@ fun Project.setupStub() { val aapt = File(android.sdkDirectory, "build-tools/${android.buildToolsVersion}/aapt2") val apk = File(buildDir, "intermediates/processed_res/" + "${variantLowered}/out/resources-${variantLowered}.ap_") - val apkTmp = File("${apk}.tmp") val genManifestTask = tasks.register("generate${variantCapped}ObfuscatedClass") { inputs.property("seed", RAND_SEED) @@ -358,7 +357,9 @@ fun Project.setupStub() { registerJavaGeneratingTask(genManifestTask, outFactoryClassDir, outAppClassDir) val processResourcesTask = tasks.named("process${variantCapped}Resources") { + outputs.dir(outResDir) doLast { + val apkTmp = File("${apk}.tmp") exec { commandLine(aapt, "optimize", "-o", apkTmp, "--collapse-resource-names", apk) }