56 Commits

Author SHA1 Message Date
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
Peter Serwylo
2da1a5acd4 Merge branch '172-typo' into 'master'
Fix #172:  typo in English strings

Fix typo in English string (Do you ant >> Do you want)

See merge request !54
2015-02-28 22:42:10 +00:00
Daniel Martí
2495251a22 Run remove-unused-trans 2015-02-25 20:42:34 +01:00
Daniel Martí
ada40cd746 Fix remove-unused-trans script 2015-02-25 20:35:21 +01:00
Daniel Martí
c09708a09e Get rid of "on/off" descriptions for checkbox prefs
Closes #149
2015-02-25 19:52:11 +01:00
Ciaran Gultnieks
da01be7986 Merge branch 'update_interval' into 'master'
Repository update interval (#158)

This is issue #158 https://gitlab.com/fdroid/fdroidclient/issues/158

I have modified the update interval to include "weekly" and "Every 2 Weeks" and removed "Hourly" as update frequencies. THe maximum interval was daily which was still too often for me. I have removed "Hourly" as you probably have to pay for your bandwidth and that is insanely often :-). Every 4 hours should still be plenty often.

2 Languages did not have the right amount of options there anyway, and I fixed those.

Please check, test, judge and ... hopefully ... merge.

See merge request !52
2015-02-25 16:02:42 +00:00
Laura Arjona Reina
2da1e14374 Fix typo (#172) 2015-02-23 15:44:50 +01:00
Hans-Christoph Steiner
e0aae7d797 ant-prepare.sh: add ANDROID_HOME/tools to PATH if it is not there
This makes this script more likely to run on various setups, since it does
three checks for finding where the `android` utility is:

1. is it in the PATH already?
2. is ANDROID_HOME set?
3. does ~/.android/bashrc exist?

This also copies ~/.android/ant.properties into the project for anyone who
wants to setup automated tests of `ant release` builds.
2015-02-17 14:29:04 +01:00
Daniel Martí
63a86df035 Bump to 0.79-test 2015-02-16 08:38:00 +01:00
Sebastian Spaeth
1895d2f909 Allow to check repositories less often
The maximum interval to check repositories was "Daily". Allow to also
update weekly and bi-weekly and remove the "hourly" option (someone has
to pay for all that bandwidth after all). I was considering to even remove
the "Every 4 hours" option, but did not dare do it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2015-01-30 16:15:45 +01:00
Peter Serwylo
2fe91bc35e Prevent VerifyError when loading FileCompat.
Classes which contain calls to platform specific methods cause
problems, because the dexer will go looking for that method even
if you put a guard condition checking the build number. However,
if you lazily load a class depdending on the version number, then
older API devices wont try and load it, and no VerifyError occurs.
2015-01-27 23:24:00 +11:00
Peter Serwylo
08af7ee157 Change symlink implementation to use best available impl per platform.
* Android-21 introduced an API for symlinking.
 * Android-19 has an API which can be used via reflection.
 * Earlier versions use Runtime.exec('/system/bin/ln')

This also extends the SanitizedFile stuff so that the android < 19 can
safely use Runtime.exec() with less fear of command injection vulnerabilities.

Finally, some tests for the SanitizedFile and symlink stuff was added.
2015-01-27 22:47:32 +11:00
Peter Serwylo
afef5ea233 Added test for SanitizedFile class. 2015-01-26 13:53:16 +11:00
Peter Serwylo
37b3f1ff57 Cache .apks in internal storage before installing.
This prevents an app with "write external storage" permission from
being able to switch the legit app with a dodgey one between F-Droid
requesting an install, and the package manager actually showing the
install dialog to the user.

In order to make the file in private internal storage readable by
the package manager, its parent directories need to be world-executable,
and the file itself needs to be world-readable. It seems that the
"/data/data/org.fdroid.fdroid/cache" dir provided by the Context is
already world executable, but the "apks" subdirectory does not default
to this.

Also, to be compatible with android-8, a Runtime.getRuntime().exec()
call was added for such devices, which invokes /system/bin/chmod.
The effect of this was to require some level of file sanitization to
be made available using the Java type system to prevent command injection
attacks from weird apk names (as people are free to download metadata
from random internet people).
2015-01-26 09:36:56 +11:00
Daniel Martí
85b7e77324 Some code formatting fixes in AppDetails 2015-01-20 11:37:16 -05:00
Dominik Schürmann
2392507634 Accept same set of characters for apk file names for 'pm install' like for package names 2015-01-19 19:47:18 +01:00
Dominik Schürmann
d941ac5eb0 Only accept valid package names as parameter for 'pm uninstall' 2015-01-19 19:47:16 +01:00
Dominik Schürmann
1f2fe25cd4 RootInstaller: Put quotes around filenames and package names 2015-01-19 19:47:13 +01:00
Dominik Schürmann
521218a45c Code cleanup and simplifications 2015-01-19 19:47:10 +01:00
Daniel Martí
7e7f0fe6f2 Fix some indentations in AppDetails 2015-01-04 00:24:55 +01:00
Daniel Martí
2bd05dec38 Remove unnecessary spaces 2015-01-04 00:23:19 +01:00
Daniel Martí
c6c472402d More final keywords 2015-01-03 20:46:31 +01:00
Daniel Martí
d2ade5c69b Don't show "not installed" for apks installed from someplace else
Fixes #107.
2015-01-03 20:27:28 +01:00
Daniel Martí
1405705fd5 Add some final keywords 2015-01-03 19:38:54 +01:00
Daniel Martí
623748091d Also explicitly state telephony as not required 2015-01-03 18:13:35 +01:00
Daniel Martí
bfc79f3a79 Supress deprecation warnings of compat CPU_ABI* usage 2015-01-03 18:05:04 +01:00
Daniel Martí
55c1bd0572 Support devices with more than two ABIs on >=21
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.
2015-01-03 17:53:36 +01:00
Daniel Martí
a03053e80a Replace the deprecated FILL_PARENT by MATCH_PARENT 2015-01-03 17:35:01 +01:00
Daniel Martí
bbca04c79b Fix comments on project.properties 2015-01-03 17:04:50 +01:00
Daniel Martí
2d44c35951 Remove more trailing whitespaces 2015-01-03 17:00:11 +01:00
Daniel Martí
30385baf16 Bump to 0.78 2014-12-31 01:04:15 +01:00
Daniel Martí
e16ab9e74d Remove more trailing whitespaces 2014-12-31 01:00:31 +01:00
Daniel Martí
b42de49cb4 Fix default locale lint warning 2014-12-31 00:25:27 +01:00
Daniel Martí
e6d784368f Fix a StringFormatInvalid error 2014-12-31 00:15:20 +01:00
Daniel Martí
0f5a49fdd4 Adapt remove-unused-trans to gradle, yet to be tested 2014-12-31 00:11:33 +01:00
Daniel Martí
5dd4b8de1c Fix lone tabbed line 2014-12-31 00:10:09 +01:00
Daniel Martí
30bebd8361 Also generate txt lint report for script usage 2014-12-31 00:09:58 +01:00
Daniel Martí
5b2d75c018 Run fix-ellipsis 2014-12-31 00:00:20 +01:00
Daniel Martí
5af7cac4b7 Remove all trailing whitespaces in source files 2014-12-30 23:48:36 +01:00
Daniel Martí
69cc6ee3bb Merge branch 'gradle-improvements' of https://gitlab.com/pserwylo/fdroidclient 2014-12-30 23:45:19 +01:00
F-Droid Translatebot
ddc4181bba Translation updates 2014-12-30 22:37:50 +00: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
F-Droid Translatebot
3a7e68da9e Translation updates 2014-12-18 11:02:35 +00:00
F-Droid Translatebot
442651b6fe Revert "Translation updates" - zh-hk is not valid for Android
This reverts commit f681eaac975d4d643588a61298f6d22078f7f574.
2014-12-18 11:01:05 +00:00
F-Droid Translatebot
f681eaac97 Translation updates 2014-12-18 10:44:03 +00:00
Hans-Christoph Steiner
d00888e6a3 move Jenkins script back to ./jenkins-build
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.
2014-12-12 10:47:04 +01:00
Hans-Christoph Steiner
851e13f485 move all ant settings to project.properties
No need in having them scattered across multiple files.
2014-12-11 13:59:29 +01:00
Hans-Christoph Steiner
8b9e5e5e5a simplify Eclipse setup by making direct imports of submodules work
These two changes make it so that the submodules can be directly imported
into Eclipse, and they'll be all setup to just work.
2014-12-11 13:52:40 +01:00
Hans-Christoph Steiner
a6b75ce822 rename script for building flash zip to make distinct from embedded scripts 2014-12-11 13:51:35 +01:00