1657 Commits

Author SHA1 Message Date
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
Peter Serwylo
e7e07bd03b Merge branch 'for-mainline' into 'master'
For mainline

See merge request !43
2014-12-28 01:48:58 +00: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í
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
F-Droid Translatebot
ff87f0a77f Revert "Translation updates"
This reverts commit 0a77a9d210b88bc1e5e8994c391b7abf071b047d.
2014-12-18 10:40:14 +00:00
F-Droid Translatebot
0a77a9d210 Translation updates 2014-12-18 10:36:57 +00:00
Kees Jongenburger
c02194d894 Update README after F-Droid file move.
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.
2014-12-16 15:36:16 +01:00
Daniel Martí
ce1ffb83cf Merge branch 'master' of https://gitlab.com/eighthave/fdroidclient 2014-12-14 15:53:45 +01:00
Daniel Martí
7d1bfd9ae0 Bump toolVersion 2014-12-14 15:52:54 +01: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
Hans-Christoph Steiner
9f50a0003c zip-build: fix script to work when called from anywhere
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.
2014-12-11 13:50:14 +01:00
Hans-Christoph Steiner
f538e0da8c add tests for RepoXMLHandler
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
2014-12-11 13:50:05 +01:00
Hans-Christoph Steiner
8a06aa1c9b remove newlines and extra spaces when parsing repo name and description
The formatting of these texts should happen in the Android layouts, not
with inline whitespace characters.
2014-12-11 13:49:56 +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í
c7e9e16a6b Bump to 0.77-test 0.77-test 2014-12-09 15:55:13 +01:00
Daniel Martí
fa9690886b Merge branch 'gradle-structure'
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.
2014-12-09 15:37:14 +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
Peter Serwylo
f0dba2f6e7 Merge branch 'fix-111/lollipop-sadness' into 'master'
Fix issue #111 (Doesn't work on lollipop devices)

See Issue #111 (monster comment https://gitlab.com/fdroid/fdroidclient/issues/111#note_379713) for details of fix.

See merge request !41
2014-12-03 10:37:12 +00:00
Peter Serwylo
6d0207c32e More robust failure conditions for local repo keystore.
Was experiencing some problems with local repo keystore on Android 2.3.4.
Previously, the local repo keystore could fail to create, but would still
return a LocalRepoKeyStore instance to be used. Now it throws a checked
exception, and is dealt with in the relveant places.

Also cleaned up some calls to "e.printStackTrace()" and replaced with
more informative logging messages.
2014-11-29 03:58:43 +11:00
Peter Serwylo
0a4725b962 Disable spongycastle before verifying jar files.
Fixes issue #111. This is a workaround rather than a full solution,
but it solves the problem. There is a bug in Lollipop, whereby including
spongycastle as a security provider causes problems verifying .jar files.
As a result, it is now disabled when actually performing verification,
so that the libraries provided by Android do the work, and then re-enabled
afterwards.

There is an ever so slight chance that the period when this is disabled
may align with the period when spongycastle may actually be required
(i.e. for signing a local repo index). This is a risk which I cnanot
see how to avoid, and will likel7 cause either the signing to fail
due to the unavailability of the relevant security classes. However
this is very minimal, hard to reproduce (I couldn't get it to happen)
and also has the effect of the local repo failing, rather than the updating
of apps failing (which is arguably more important) and so is worth it in
my opinion.

See comments at https://gitlab.com/fdroid/fdroidclient/issues/111
for much greater detail.
2014-11-28 06:48:38 +11:00
Daniel Martí
2d78fa802f Remove values-zh-hk as it is making builds error 2014-11-15 22:13:42 +01:00
Daniel Martí
afad8fb85a Run fix-ellipsis.sh 2014-11-15 20:37:38 +01:00
F-Droid Translatebot
8de3842285 Translation updates 2014-11-14 12:12:16 +00:00
Daniel Martí
9b108e36d8 Bump build.gradle tools and plugin versions 2014-11-14 12:10:56 +01:00
Daniel Martí
eb83736dce Better fallback for sdk levels we don't yet know about 2014-11-14 12:10:07 +01:00
Daniel Martí
1248bd0523 Fix more RTL issues 2014-11-05 21:52:33 +01:00
Daniel Martí
216ec24680 Bump target sdk to 21 2014-11-05 21:44:36 +01:00
Daniel Martí
9ab4b55de1 Fix select_local_apps_list_item layout on <17 2014-11-05 21:38:55 +01:00
Daniel Martí
a845f66099 Don't abort on lint errors 2014-11-05 21:36:35 +01:00
Daniel Martí
c6811d83b2 Bump gradle plugin version to 0.14.1, upgrade properties 2014-11-05 21:31:25 +01:00
Daniel Martí
e6bce05bd2 Bump toolVersion 2014-11-05 21:16:16 +01:00
Daniel Martí
3e0df70c56 Bump support library submodule to v21.0.1 too
Assuming that the HEAD at October 30th, 2014 is what was used to release
21.0.1. We can't know for sure since it wasn't tagged.
2014-11-05 21:07:00 +01:00
Daniel Martí
9f0873a3af Update support-v4 to 21.0.1 2014-11-05 20:59:04 +01:00
Daniel Martí
c3af53a18d Update UIL to 1.9.3 2014-11-05 20:46:07 +01:00
Daniel Martí
aa0abaeb70 Add 20 and 21 to getAndroidVersionName, better out of bounds check 2014-11-05 19:57:09 +01:00
Ron Rieve
8e3b064786 On update errors, actually display an error
Previously the update silently failed, and even showed "No Repository has any package updates". The commit relays one error message per repo and adds a localized message when only a part of the repo updates failed. Also, the error message for more severe errors is made more verbose.

Also removed the "errmsg" variable.
2014-11-04 21:50:44 +11:00
Peter Serwylo
6d1801c0fd Merge branch 'feature/swap-ui-implementation' into 'master'
Initial "swap" UI implementation

This is a major rejigging of the "Local Repo" user interface, to make it easier for lay people to use F-Droid to swap their apps with their peers. I wont mention too much here, because the individual commits have more detailed information. However, it is worth  noting that major things that probably deserve testing are:
 * Going through the proccess of creating a swap
 * Scanning the QR code from another users F-Droid "swap" screen
 * Scanning the QR code from their barcode scanner
 * Entering the URL shown below the QR code into the browser and following the steps
 * Installing an app from the "Swap" success screen
 * Using NFC to add swap (I couldn't test this as only have 1 NFC device in the house)

I've actually had trouble installing from the swap screen after upgrading to Android 4.3.1 (CM) on my Nexus 4. However that issue seems to be present on the current stable "Local Repo" implementation too, so will stop banging my head against the desk in the interest of getting this initial swap implementation out.

Subsequent work will go towards refining edge cases. I'm cataloging these in my fork of fdroidclient on github. The type of things which I still need to work on include :
 * i18n all of the strings
 * Enabling NFC
 * Dealing with WIFI disconnects
 * Support WIFI AP
 * Adding back the "search" functionality in the "create swap" screen
 * ... and no doubt others will arise ...

A major feature which is missing is Bluetooth, but some earlier work has been done on that which will make it less of a burden to implement. As this is getting reviewed for merging, I will start working through these other issues.

See merge request !28
2014-10-22 12:45:00 +00:00
Peter Serwylo
58db8a1f00 Correct handling of back button presses during swap workflow.
When electing to "Swap Apps" from the main menu, and a LocalRepoService
is already running, then it jumps straight to the wifi QR fragment.
However, it didn't play nice when pressing the "back" button. This is
now fixed, by manually recreating the backstack in this situation.

It also fires up the NFC push message if NFC exists.
2014-10-22 18:08:32 +10:30
Peter Serwylo
92f71ca13a Ability to cancel swap. Made QR code larger.
Added a "Cancel" button to the swap QR code screen.
Also changed how the LocalRepoService deals with onDestroy(). Previously, it
would invoke `stopNetworkServices()` on the UI thread, blocking for a
significant portion of time (enough to cause ANR messages on my devices).
Now, it does this on a new thread.

As for the QR code size, it was getting quite small on my nexus 4,
which I think has a large screen (even though there is much larger about).
As a result, it couldn't be scanned properly using barcode scanner.
This is the first major diversion from carries mockups, in that the qr
view is now in a scroller, which means the "Open QR Code Scanner" button
may well not be visible on the main screen on small devices. Not sure about
how to manage this tradeoff between biggish qr code but everything
viewable on one screen.
2014-10-22 18:08:32 +10:30