2020-11-05 18:58:23 +02:00
|
|
|
// We don't make that a gulp task because we might want to run it before
|
|
|
|
// gulp has been installed.
|
|
|
|
|
2021-12-20 17:08:43 +02:00
|
|
|
const fs = require('fs');
|
2020-11-05 18:58:23 +02:00
|
|
|
|
2021-12-20 17:08:43 +02:00
|
|
|
function main() {
|
2020-11-05 18:58:23 +02:00
|
|
|
const mobileDir = `${__dirname}/..`;
|
2021-12-20 17:08:43 +02:00
|
|
|
fs.rmSync(`${mobileDir}/android/.gradle`, { recursive: true, force: true });
|
|
|
|
fs.rmSync(`${mobileDir}/android/app/build`, { recursive: true, force: true });
|
2023-01-14 19:24:50 +02:00
|
|
|
fs.rmSync(`${mobileDir}/android/build`, { recursive: true, force: true });
|
2021-12-20 17:08:43 +02:00
|
|
|
fs.rmSync(`${mobileDir}/ios/Pods`, { recursive: true, force: true });
|
2020-11-05 18:58:23 +02:00
|
|
|
console.info('To clean the Android build, in some rare cases you might also need to clear the cache in ~/.android and ~/.gradle');
|
|
|
|
}
|
|
|
|
|
2021-12-20 17:08:43 +02:00
|
|
|
try {
|
|
|
|
main();
|
|
|
|
} catch (error) {
|
2020-11-05 18:58:23 +02:00
|
|
|
console.error('Could not clean mobile app build', error);
|
|
|
|
process.exit(1);
|
2021-12-20 17:08:43 +02:00
|
|
|
}
|