From 604ac8f0428b5b684aa01c0a9bd08ab38ce03fd2 Mon Sep 17 00:00:00 2001 From: Vilius Sutkus '89 Date: Mon, 26 Aug 2024 13:10:35 +0300 Subject: [PATCH] [Maintenance] Update gradle clean helper --- build.gradle | 5 ----- wvWare/build.gradle | 9 +++++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 760e8d4..684316e 100644 --- a/build.gradle +++ b/build.gradle @@ -5,11 +5,6 @@ plugins { id 'app.opendocument.conanandroidgradleplugin' version '0.9.2' apply false } -task clean(type: Delete) { - delete rootProject.buildDir - delete new File(projectDir, "wvWare/.cxx") -} - group = 'app.opendocument' version = '1.2.11' diff --git a/wvWare/build.gradle b/wvWare/build.gradle index c142935..e9b1599 100644 --- a/wvWare/build.gradle +++ b/wvWare/build.gradle @@ -138,3 +138,12 @@ if (System.getenv('SIGNING_KEY')) { sign publishing.publications.release } } + +// Without removing .cxx dir on cleanup, double gradle clean is erroring out. +// Before removing this workaround, check if "./gradlew assembleDebug; ./gradlew clean; ./gradlew clean" works +tasks.named("clean") { + def dotCxxDir = getLayout().getProjectDirectory().dir(".cxx") + doFirst { + delete dotCxxDir + } +}