11 Commits

Author SHA1 Message Date
Daniel Martí
6eff521459 Bump build-tools to 22.0.0 2015-03-11 23:09:42 +01:00
Daniel Martí
00195be469 lint text output is no longer useful 2015-03-08 20:37:36 +01:00
Peter Serwylo
ccdb161de4 Final fixup before merge. Rebuild binary deps, minor fixes.
Binary deps were not getting build and cleaned from the binaryDeps
subdirectory of "libs". Also, reverted the android support appcompat
library target to android-19, as there was no need to change it.
2015-03-03 18:44:36 +11:00
Peter Serwylo
aa38418c91 Bump support libraries to v20. Gradle doesn't build them by source for now.
The support libraries expect to be using the gradle plugin version 0.10.0.
We are currently on version 1.0.0. They use APIs in their build script which
have moved or been removed, and so the build just breaks when we run it with
the 1.0.0 plugin. I tried some magic to make it work in various ways, but
kept failing. As such, I've reverted the `gradle -PsourceDeps` build to not
build the support libraries from source. In the future, we should be able to
change this if they change the plugin version to a more recent one.

Note that the ant build script still hasn't been modified, and so will be
using the binary support-v4 library, but should build appcompat-v7 from source.

Was going to bump to Support v21, however there is some behaviour change which
causes a crash. They have removed the progress view from the toolbar/actionbar.
This breaks the AppDetails activity. As such, I'll leave that for the future.

For now, there will be a slight difference between building with
ant (which uses support v-almost-21) and gradle (which uses v20).
This will stay the case until we get around to completely porting
the app to v21, and fixing any bugs or UI sadness that arises.
2015-03-03 00:46:43 +11:00
Peter Serwylo
eec57945c0 Default to binary dependencies, with option for source builds.
NOTE: This commit does not touch the ant build system at all,
only gradle.

There are currently 23 gradle projects which require configuration,
let alone building, in order to build F-Droid. This takes a non-trivial
amount of time/memory/cpu. Additionally, it also provides difficulties
when importing the project into Android Studio - which is the IDE that
many potential contributors will be using. Finally, I have over 100mb
of data in the extern/ folder, and the support libraries require almost
every single Android SDK to be installed, which is several GB. This is
not a friendly environment to encourage people to submit merge requests.

However, I'm very mindful of the need for an open source project such
as F-Droid to be able to be built from source. So to make sure we have
the best of both worlds, I've ensured that building all dependencies
from source is still possible.

The F-Droid/libs/README.md file explains in greater detail how to
do this (i.e. "gradle -PsourceDeps build").

As much as possible, I've tried to make the binary dependencies fetched
from jcenter. However there are still libraries which either haven't
integrated required changes for F-Droid back upstream, or don't have
mavenCentral/jcenter binaries available.

Android preference fragment has been changed to the original
upstream repository. The one we had before was because upstream
hadn't merged a MR for gradfle support yet. However, that has
now been merged. This version still doesn't exist in jcenter though.

In order for libsuperuser to build from upstream, using
`gradle -PsourceDeps`, we need to include a few gradle plugins
from jcenter which are never actually used (used by upstream to
release to jcenter).

Even though support-v4 is included through jcenter, it is kept in
the libs directory, so that ./ant-prepare.sh can use it.

Update support preference fragment to newer version. There has been
bugfixes commited, so lets include them in the version we are using.
2015-03-01 10:21:51 +11:00
Daniel Martí
30bebd8361 Also generate txt lint report for script usage 2014-12-31 00:09:58 +01:00
Peter Serwylo
d39ca46953 Clean up build scripts to make it harder to fail.
* 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.
2014-12-29 01:38:51 +11:00
Daniel Martí
c8a62a8e79 Warnings are from Android's lint, not java 2014-12-21 14:00:00 +01:00
Daniel Martí
e085bcd54c Use the newer plugin form 'com.android.application' 2014-12-10 10:53:37 +01:00
Daniel Martí
9d2a4eb999 Enable all java lint warnings 2014-12-10 10:50:08 +01:00
Daniel Martí
06dd4c8dcb Move F-Droid project into subdir, keeping a root gradle project
Also improved .gitignore a tad
2014-12-09 15:36:07 +01:00