From acbbd99b0d5b4298c489abbc54a3a12ed35cb5a5 Mon Sep 17 00:00:00 2001 From: Jonatan Rhodin Date: Thu, 19 Dec 2024 11:20:53 +0100 Subject: [PATCH] Clean cargo on gradle clean --- android/app/build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index b3bbe848c555..8ba2a272bf2a 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -323,6 +323,16 @@ tasks.register("generateRelayList") { } } +tasks.register("cargoClean") { + workingDir = File(repoRootPath) + commandLine("cargo", "clean") +} + +if(gradleLocalProperties(rootProject.projectDir, providers) + .getProperty("CLEAN_CARGO_BUILD")?.toBoolean() != false) { + tasks["clean"].dependsOn("cargoClean") +} + fun isReleaseBuild() = gradle.startParameter.getTaskNames().any { it.contains("release", ignoreCase = true) }