build: improve gradle experience

This expands the gradle wrapper shell script used by the buildserver for
usage outside the buildserver environment. It also allows downloading
whitelisted versions of gradle if they are not yet deployed to the
buildserver by simply upsating the copy of fdroidserver (in contrast to
having to reprovision the whole buildserver).

We first move the buildserver/gradle shell script to the repo root
as gradlew-fdroid, as it's an fdroid specific gradle wrapper.
We also now sync it inside the build VM before each build.

We then add a list of whitelisted gradle distributions taken from the
makebuildserver script.

The script additionally now reads two env vars which tell it where to
expect installed versions of gradle and where it might store downloaded
gradle .zip files. Both of those are configurable from config.py. As the
first should normally just be a subdir of the second it's not exposed in
the example config.py but only used by the buildserver config.py.

Default config now uses this internal gradle wrapper but a path to a
custom wrapper or specific gradle distribution can still be set from
config.py.

Closes fdroid/fdroidserver#98
Ref: fdroid/fdroidserver#370
This commit is contained in:
Marcus Hoffmann 2018-07-08 17:34:17 +02:00
parent 68cb81f38d
commit 9889a98dea
No known key found for this signature in database
GPG key ID: ACDF63BC43D5E530
9 changed files with 217 additions and 109 deletions

View file

@ -21,6 +21,10 @@
# 'r17b': None,
# }
# Directory to store downloaded tools in (i.e. gradle versions)
# By default, these are stored in ~/.cache/fdroidserver
# cachedir = cache
# java_paths = {
# '8': "/usr/lib/jvm/java-8-openjdk",
# }
@ -39,6 +43,7 @@
# mvn3 = "mvn"
# Command or path to binary for running Gradle
# Defaults to using an internal gradle wrapper (gradlew-fdroid).
# gradle = "gradle"
# Set the maximum age (in days) of an index that a client should accept from