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 + } +}