From 71c76a4ff23a606f805112c86a873cf338cf4468 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Tue, 18 Oct 2022 20:37:23 -0700 Subject: [PATCH] Update the `clean` task configuration Running `gradlew clean` will now properly delete the generated build artifacts --- platform/android/java/build.gradle | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/platform/android/java/build.gradle b/platform/android/java/build.gradle index da30bd3a95f..3839e167c91 100644 --- a/platform/android/java/build.gradle +++ b/platform/android/java/build.gradle @@ -281,6 +281,11 @@ task generateDevTemplate { finalizedBy 'zipCustomBuild' } +task clean(type: Delete) { + dependsOn 'cleanGodotEditor' + dependsOn 'cleanGodotTemplates' +} + /** * Clean the generated editor artifacts. */ @@ -297,8 +302,6 @@ task cleanGodotEditor(type: Delete) { // Delete the Godot editor apks in the Godot bin directory delete("$binDir/android_editor.apk") delete("$binDir/android_editor_dev.apk") - - finalizedBy getTasksByName("clean", true) } /** @@ -325,6 +328,4 @@ task cleanGodotTemplates(type: Delete) { delete("$binDir/godot-lib.debug.aar") delete("$binDir/godot-lib.dev.aar") delete("$binDir/godot-lib.release.aar") - - finalizedBy getTasksByName("clean", true) }