File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,29 +172,7 @@ dependencies {
172172}
173173
174174tasks. named(" clean" ) {
175- doLast {
176- delete(new File (projectDir, " .cxx" ))
177- }
178- }
179-
180- // This is needed because task "clean" depends on these tasks:
181- // :app:externalNativeBuildCleanLiteDebug
182- // :app:externalNativeBuildCleanLiteRelease
183- // :app:externalNativeBuildCleanProDebug
184- // :app:externalNativeBuildCleanProRelease
185- // And these tasks expect to find build/conan/[ABI]/conan_toolchain.cmake files
186- //
187- // If build folder is malformed, we can't run `gradle clean` without this workaround.
188- // This is because we supply our (conan's) CMAKE_TOOLCHAIN_FILE.
189- // This workaround removes these "clean" task dependencies if conan_toolchain.cmake is not found (malformed build dir)
190- project. afterEvaluate {
191- [" armv7" , " armv8" , " x86" , " x86_64" ]. each { String arch ->
192- if (! new File (projectDir, ' build/conan/' + arch + ' conan_toolchain.cmake' ). exists()) {
193- def cleanTask = tasks. named(" clean" ). get()
194- cleanTask. dependsOn - = tasks. named(' externalNativeBuildCleanLiteDebug' )
195- cleanTask. dependsOn - = tasks. named(' externalNativeBuildCleanLiteRelease' )
196- cleanTask. dependsOn - = tasks. named(' externalNativeBuildCleanProDebug' )
197- cleanTask. dependsOn - = tasks. named(' externalNativeBuildCleanProRelease' )
198- }
175+ doFirst {
176+ delete getLayout(). getProjectDirectory(). dir(" .cxx" )
199177 }
200178}
You can’t perform that action at this time.
0 commit comments