Commit Graph

93 Commits

Author SHA1 Message Date
Hans-Christoph Steiner d02ea22572
bump gradle plugin to latest bugfix version 2020-07-20 17:48:55 +02:00
Dominik Schürmann fa209c457f Use Android Gradle Plugin 3.6.0 2020-07-14 21:34:39 +02:00
Marcus Hoffmann 38374e1d32 update androidX libraries to latest versions
This needs another AGP and gradle update as
com.google.android.material:material:1.1.0 created compile errors
otherwise.
2020-07-14 14:10:21 +02:00
Marcus Hoffmann e2a75f69ee androidX migrations preparations
We need compileSdk 28 and the required AGP and gradle versions, as well
as updating to compatible support library revisions.

minSdk and targetSdk needs to move to build.gradle from manifest.
buildToolsVersion isn't used anymore.
2020-07-14 14:10:21 +02:00
Hans-Christoph Steiner cd23d5cd85
bump to latest bugfix version of gradle android plugin 2020-01-10 16:27:57 +01:00
Hans-Christoph Steiner 1cfae44aec
only download from jCenter as a last resort
"Artifact integrity verification aside, not only should jcenter() always be
last, but you need to put mavenCentral() before them. JCenter and Bintray
keep proving they're not a trustworthy artifact host. Ideally you fetch
nothing from them."
https://twitter.com/JakeWharton/status/1073102730443526144

https://blog.autsoft.hu/a-confusing-dependency/
2020-01-10 16:27:55 +01:00
Hans-Christoph Steiner 3878b781fd maven.google.com must be added before jcenter()
* https://stackoverflow.com/a/50570206
* https://stackoverflow.com/a/50563942
* https://developer.android.com/studio/build/dependencies#google-maven
2018-06-08 12:12:04 +02:00
Hans-Christoph Steiner e55b121489 simplify gradle repositories to fix Android plugin download error 2018-06-06 20:51:50 +02:00
Hans-Christoph Steiner 40fdccf262 purge gradle-witness until it is compatible with 'implementation'
https://github.com/signalapp/gradle-witness/issues/27
2018-04-23 12:57:18 +02:00
Hans-Christoph Steiner e00fe0dcda switch to latest official BottomNavigation release
#1379
2018-04-19 15:51:44 +02:00
Hans-Christoph Steiner 3a2c10f077 update to latest Gradle Android Plugin (3.1.1) and gradle (4.4.1)
#1379
2018-04-19 15:51:43 +02:00
Hans-Christoph Steiner 5f26a78527 auto-disable preDexLibraries on CI systems
preDexing helps repeat builds run faster, but slows down builds that do
not have any caching.  CI builds start from scratch each time.  Turns
out that GitLab CI, Travis CI, Circle CI, and probably many others all
define the "CI" environment variable, so its easy to detect when running
in a CI environment.  This makes things a lot cleaner.

* https://docs.gitlab.com/ce/ci/variables/README.html
* https://docs.travis-ci.com/user/environment-variables/
* https://circleci.com/docs/2.0/env-vars/
* https://github.com/codepath/android_guides/wiki/Setting-up-Travis-CI
* https://stackoverflow.com/questions/23137764/building-a-debug-apk
2017-10-27 10:54:20 +02:00
Hans-Christoph Steiner 1f8330fd06 use gradle android plugin v2.2.2
Starting with v2.2.2, it zeroes out timestamps in the APK's ZIP header
https://android-developers.googleblog.com/2016/11/understanding-apk-packaging-in-android-studio-2-2.html

This version is also the version that is included in Debian/stretch.
2017-05-01 23:46:13 +02:00
Daniel Martí 36378acc7b gradle: bump plugin version to 2.2.0
Also update the dependency declarations since the current ones break
with the new plugin/gradle version.

https://stackoverflow.com/questions/39602587/could-not-get-unknown-property-assemblerelease-for-project
2016-09-28 21:58:27 +01:00
Daniel Martí cbccb910a2 gradle: bump plugin and wrapper version
Since the new plugin requires 2.14.1 for security reasons.

Also re-run `gradle wrapper` to update the scripts and the jar.
2016-08-21 11:06:41 +02:00
Daniel Martí fef76eff89 gradle: bump android plugin version to 2.1.2
Bugfix release, no changelog on developer.android.com.
2016-06-07 22:05:46 +01:00
Hans-Christoph Steiner 41b2e175c9 improve build server performance by allowing disabling of pre-dexing
It seems that Google is finally paying some attention to CI builds with the
emulator, they issued a recommendation:
http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance
2016-05-09 19:58:05 +02:00
Daniel Martí 2ed7c925f7 gradle: bump Android plugin to 2.1.0 2016-05-07 21:28:06 +01:00
Daniel Martí 2eea94e5ea gradlew: bump to 2.12
Also remove the 2.11 restriction on the root build.gradle file. It's
unnecessary, as the Android plugin will already error if the version is
too old. This means that the build will work on any version that is new
enough, which should be 2.10-2.12 at the time of writing.
2016-04-23 01:16:14 +01:00
Daniel Martí 27c9a21764 Gradle: Bump android plugin to 2.0.0
Also add useProgard true, since minifyEnabled now refers to the new
experimental code shrinker.

I'm not removing proguard yet as we depend on it for the samsung
workaround. I also do not know how to port the rest of the config
options to the new shrinker.
2016-04-14 15:31:47 +01:00
Daniel Martí ddda82509c Bump gradle to 2.11 2016-02-15 16:34:41 +00:00
Daniel Martí 89c53bbd5e Bump gradle plugin to 1.5.0 2016-02-11 12:39:48 +00:00
Daniel Martí 57f5180dae Bump Gradle to 2.9
I'd do 2.10, the current stable, but the android plugin seems to break
with it.
2016-01-05 09:24:02 +01:00
Daniel Martí b6654f5077 Bump gradle to 2.8 2015-11-30 10:37:38 +01:00
Daniel Martí 999fa6eb21 Add checkstyle with a small config
It doesn't include all of the Android style checks as found in Android Studio,
but it's a start.

Bump Gradle to 2.7 because the checkstyle plugin in earlier versions is just
not good enough.
2015-10-08 17:26:27 +02:00
Daniel Martí 6d579368af Start using gradle-witness
Fixes #429.
2015-09-25 22:00:24 -07:00
Daniel Martí 4f40160c40 A root build.gradle file is now common 2015-08-20 10:35:10 -07:00
Daniel Martí ad8896b2e8 Bump gradle plugin version to 1.3.1 2015-08-13 11:23:28 -07:00
Daniel Martí 50ac03e97d Bump gradle plugin to 1.3.0 2015-07-31 17:13:42 -07:00
Daniel Martí 340cba3ebe Bump gradle plugin version 2015-07-25 21:01:39 -07:00
Daniel Martí 49b954e63d Bump gradle plugin to 1.2.2 2015-04-29 22:16:14 +02:00
Daniel Martí d9590743d9 Get rid of root build.gradle hacks again
Now that we controll all lib build.gradle files, we can finally do it.

If we want to build support-v7 from source again with gradle, we'll import the
build.gradle and "fix" it like the rest.
2015-04-01 11:59:31 +02:00
Daniel Martí 48c3e1f747 Revert "Remove now unneeded hacks from root build.gradle"
This reverts commit c4f416396a.
2015-03-31 21:25:02 +02:00
Daniel Martí c4f416396a Remove now unneeded hacks from root build.gradle 2015-03-31 20:47:19 +02:00
Daniel Martí 3784e58fc4 Add gradle support to UniversalImageLoader 2015-03-31 20:19:04 +02:00
Daniel Martí 6deac28a8b libsuperuser: remove maven and bintray stuff 2015-03-31 19:38:25 +02:00
Daniel Martí de3c224b02 Move zipsigner deps into its own build.gradle 2015-03-31 19:14:26 +02:00
Daniel Martí 76396f224f Bump gradle plugin to 1.1.3
We also no longer depend on the undocumented internal variable sdkFolder
2015-03-30 16:49:56 +02:00
Daniel Martí ebacde9631 Bump build-tools to 22.0.1 2015-03-30 16:38:11 +02:00
Daniel Martí bd6e2a3046 Bump gradle plugin to 1.0.1
I tried 1.1.3, but it failed. Needs further investigation.
2015-03-11 23:32:05 +01:00
Daniel Martí 6eff521459 Bump build-tools to 22.0.0 2015-03-11 23:09:42 +01: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
Dominik Schürmann bfc35691b6 Fix gradle build: dont abort on lint errors 2015-01-21 10:03:45 +01:00
Daniel Martí 27525122b8 Update to plugin version 1.0.0 2015-01-04 00:32:30 +01:00
Daniel Martí 5af7cac4b7 Remove all trailing whitespaces in source files 2014-12-30 23:48:36 +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
Peter Serwylo 405a31a415 Added support annotation library dependency.
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.
2014-12-27 11:10:43 +11:00
Daniel Martí 7d1bfd9ae0 Bump toolVersion 2014-12-14 15:52:54 +01:00
Daniel Martí e085bcd54c Use the newer plugin form 'com.android.application' 2014-12-10 10:53:37 +01:00