Also, start using String[] like Android's SUPPORTED_ABIS instead of
Set<String>. Said list of ABIs will always be very short, at most containing a
handful of elements.
* Don't apply android plugin in root project
This results in the root project being treated like and Android project.
That is, gradle will expect an AndroidManifest, a targetSdk property, and
all sorts of stuff that is not relevant to the root project.
Perhaps more importantly, this breaks integration with Android Studio,
which is the tool that many potential contributors will be using.
Finally, it also allows runing gradle tasks in the root project, rather
than having to cd into the F-Droid directory, which is a minor nicety.
The reason it was there in the first place was to make it so that we could
find the location of the Android SDK using the same mechanism that the
plugin used. To deal with this, this commit adapts the SDK finding code
from the gradle plugin.
* Make gradle error out when missing depenencies.
The support v4 library requires some obsolte SDKs that are likely
not installed. It caused non-intuitive errors to come up for me,
so I've made gradle tell the user when this occurs.
* Documented the main build.gradle file
This is primarily to explain the hacks we use in order to build the
Android support libraries.
The specific reason for this is that it provides @Null and @NotNull
annotations which should increase the safety of our code. Many of the
bugs which get filed are due to NullPointerExceptions, which could be
avoided by tooling using these annotations. The goal is to statically
catch this specific class of errors in as many situations as possible,
rather than waiting for them to occur at runtime.
The README documentation was not updated after the move of the f-droid client
code to the F-Droid directory. The instruction where therefore wrong
The troubleshooting documentation about determining the used Android versions
in the project was also outdated. While the script was made functional the tip
to install the various sdk from the command line did does not work for me.
This script should be in the root of the git repo so that the config in
Jenkins' web interface is always just:
./jenkins-build
This commit also includes a little code to make it easier for people to run
this script on their own machines, if they want to reproduce the Jenkins
build setup.
This now figures out the root of the fdroidclient project and works there,
rather than just working in the root on the project. So it can be run like
./tools/zip-build.sh or (cd tools && ./zip-build.sh) or whatever.
I also removed the pointless function, since it is only called once in the
script.
This is a basic set of tests. These tests should be extended in three ways:
* make sure all of the apps are parsed
* make sure all of the APKs are parsed
* make sure the ProgressListener is called
As described on https://f-droid.org/forums/topic/gradle-directory-structure/.
This will keep things a bit weird with git for a bit, but you can always use
--follow to make it take renames into account for the commit history.
I tweaked both the ant and gradle build setups and both of them work in the
new structure. And gradle is much faster since e.g. now an 'assemble' inside
F-Droid assembles only the client, without including all the subprojects as it
happens in master.