1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-15 09:04:04 +02:00
joplin/packages/app-mobile/tools/clean.js

21 lines
737 B
JavaScript
Raw Normal View History

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.
const fs = require('fs');
2020-11-05 18:58:23 +02:00
function main() {
2020-11-05 18:58:23 +02:00
const mobileDir = `${__dirname}/..`;
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 });
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');
}
try {
main();
} catch (error) {
2020-11-05 18:58:23 +02:00
console.error('Could not clean mobile app build', error);
process.exit(1);
}