buildserver: only install the latest gradle version

gradle checksums are now handled by gradlew-fdroid

refs #370 #517 #737
This commit is contained in:
Hans-Christoph Steiner 2021-03-04 11:33:45 +01:00
parent e6f5e68e02
commit 4b05854ffc
2 changed files with 5 additions and 126 deletions

View file

@ -10,14 +10,17 @@ vergte() {
test -e /opt/gradle/versions || mkdir -p /opt/gradle/versions
cd /opt/gradle/versions
for f in /vagrant/cache/gradle-*.zip; do
glob="/vagrant/cache/gradle-*.zip"
if compgen -G $glob; then # test if glob matches anything
f=$(ls -1 --sort=version --group-directories-first $glob | tail -1)
ver=`echo $f | sed 's,.*gradle-\([0-9][0-9.]*\).*\.zip,\1,'`
# only use versions greater or equal 2.2.1
if vergte $ver 2.2.1 && [ ! -d /opt/gradle/versions/${ver} ]; then
unzip -qq $f
mv gradle-${ver} /opt/gradle/versions/${ver}
fi
done
fi
chmod -R a+rX /opt/gradle