26 lines
598 B
Bash
26 lines
598 B
Bash
![]() |
#!/bin/bash
|
||
|
|
||
|
grep_result=$(cat app/xml-class-mapping.txt | grep bean)
|
||
|
|
||
|
touch bean_proguard_rules.txt
|
||
|
|
||
|
cat /dev/null > bean_proguard_rules.txt
|
||
|
|
||
|
echo "$grep_result" | while read LINE
|
||
|
do
|
||
|
classes=$(echo "$LINE" | awk -F ".bean -> " '{print $2}')
|
||
|
for c in ${classes[*]}
|
||
|
do
|
||
|
echo '-keep class '"$c"'.** {*;}' >> bean_proguard_rules.txt
|
||
|
done
|
||
|
|
||
|
classes2=$(echo "$LINE" | awk -F " -> " '{print $2}')
|
||
|
for c in ${classes2[*]}
|
||
|
do
|
||
|
containDot=$(echo "$c" | grep '\.')
|
||
|
if [[ "$containDot" != "" ]]
|
||
|
then
|
||
|
echo '-keep class '"$c"' {*;}' >> bean_proguard_rules.txt
|
||
|
fi
|
||
|
done
|
||
|
done
|