-
Notifications
You must be signed in to change notification settings - Fork 1
/
cleanCache.sh
executable file
·56 lines (47 loc) · 1018 Bytes
/
cleanCache.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
source_common() {
pwd=$(
cd $(dirname $0)
pwd
)
source $pwd/common.sh
}
clean_caches() {
logw "[$filename]clean android studio cache!"
dir=("app" "TestCaseLib")
for element in "${dir[@]}"; do
#clean task
rm -rf $element/build/
rm -rf $element/bin/
rm -rf $element/gen/
rm -rf $element/.settings/
rm -rf $element/.externalNativeBuild
rm -rf $element/$element.iml
rm -rf $element/.gradle
logd "[$filename]clean $element over."
done
rm -rf build/
rm -rf release/
rm -rf releasebak/
rm -rf *.iml
rm -rf .gradle/
rm -rf .idea/
rm -rf sh.exe.stackdump
rm -rf classes.dex
rm -rf local.properties
rm -rf .vs/
rm -rf .vscode/
rm -rf .DS_Store
find ./ -name '.DS_Store' -delete
if [ $# == 0 ]; then
logw "[$filename]clean project success."
loge "[$filename]>>>>you must close android studio<<<<"
else
loge "[$filename]>>clean project Failed!<<"
fi
}
main() {
source_common
clean_caches
}
main