1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

Stop the gradle version searches once one is found

This commit is contained in:
Daniel Martí 2014-05-12 15:49:23 +02:00
parent cf1201833b
commit 6cd21c108c

View File

@ -39,9 +39,9 @@ done
for f in ../build.gradle build.gradle; do
[[ -f $f ]] || continue
while read l; do
if [[ $l == *'com.android.tools.build:gradle:'* ]]; then
if [[ -z "$plugin_pver" && $l == *'com.android.tools.build:gradle:'* ]]; then
plugin_pver=$(echo -n "$l" | sed "s/.*com.android.tools.build:gradle:\\([0-9\\.\\+]\\+\\).*/\\1/")
elif [[ $l == *'gradleVersion'* ]]; then
elif [[ -z "$wrapper_ver" && $l == *'gradleVersion'* ]]; then
wrapper_ver=$(echo -n "$l" | sed "s/.*gradleVersion[ ]*=[ ]*[\"']\\([0-9\\.]\\+\\)[\"'].*/\\1/")
fi
done < $f