mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
Properly default to the highest version of gradle
This commit is contained in:
parent
fa0f9bf1af
commit
7f1acadaf1
@ -9,7 +9,6 @@ pushd "${verdir}" &>/dev/null
|
||||
v_all=(*/)
|
||||
v_all=(${v_all[@]%/})
|
||||
|
||||
v_def=${v_all[-1]}
|
||||
echo "Available gradle versions: ${v_all[@]}"
|
||||
|
||||
popd &>/dev/null
|
||||
@ -19,11 +18,23 @@ run_gradle() {
|
||||
exit $?
|
||||
}
|
||||
|
||||
contains() {
|
||||
local e
|
||||
for e in $2; do
|
||||
[[ $e == $1 ]] && return 0;
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# key-value pairs of what gradle version each gradle plugin version
|
||||
# should accept
|
||||
d_plugin_k=( 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2)
|
||||
d_plugin_v=(1.11 1.10 1.9 1.8 1.6 1.6 1.4 1.4)
|
||||
|
||||
for v in ${d_plugin_v}; do
|
||||
contains $v "${v_all[*]}" && v_def=$v && break
|
||||
done
|
||||
|
||||
# Latest takes priority
|
||||
for f in ../build.gradle build.gradle; do
|
||||
[[ -f $f ]] || continue
|
||||
|
Loading…
Reference in New Issue
Block a user