68 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
a5a90954bc fix lint UnsafeProtectedBroadcastReceiver
Android won't protect us from other apps sending other Intents to these
receivers, so at least check that the action string matches what its
looking for.  This is based on a lint recommendation.
2016-10-10 20:15:47 +02:00
Hans-Christoph Steiner
a16589eab0 bump to errors: AppCompatMethod, NestedScrolling, StringFormatCount
These are things that we definitely want to be checking, and making them
lint errors rather than warnings means the CI build will fail.
2016-10-10 19:57:56 +02:00
Daniel Martí
663d981c7a Bump to 0.102-alpha1 2016-10-06 22:37:09 +01: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í
ae78042bda Bump versionCode to 0.102-alpha0
This enables upgrading from 0.101 to master until alpha1 is out.
2016-09-28 20:44:26 +01:00
Hans-Christoph Steiner
4598a78bfd support TLS 1.2 on all repos
Update to the latest NetCipher, which now fully supports SNI, in order to
support TLS 1.2 on all supported platform levels.  Without this, a repo
that is TLS 1.2 only will be unusable on all but the most recent versions
of Android.

#431
2016-09-28 11:35:57 +02:00
Hans-Christoph Steiner
dd134c50bc update to latest support lib bugfix version: v24.2.1 2016-09-27 22:59:17 +02:00
Daniel Martí
fdc70b0f9d Bump build-tools and docker image version
The latter is simply to include the newer version.
2016-09-10 12:02:12 +02:00
Daniel Martí
fde227e889 Bump to 0.101-alpha6 2016-08-27 08:37:34 +09:00
Hans-Christoph Steiner
0577ecfc53 update support libs to latest (24.2.0) to hopefully fix crashes
Based on ACRA reports, there are some mystery UI related stacktraces that
do not have org.fdroid.fdroid lines in them.
2016-08-26 10:47:46 +02:00
Hans-Christoph Steiner
691545f065 use gradle-witness for all included libs
use the automatic method for generating the gradle-witness block so its
easy to keep it updated.
2016-08-26 10:47:46 +02:00
Hans-Christoph Steiner
3adfbc66aa sort gradle-witness lines so its easy to see changes 2016-08-26 10:42:39 +02:00
Daniel Martí
a9944f7a22 Bump robolectric to 3.1.2 2016-08-21 11:07:47 +02:00
Daniel Martí
16170d6794 Bump to 0.101-alpha5 2016-08-20 19:07:25 +02:00
Daniel Martí
3c5f8756f4 Bump to 0.101-alpha4 2016-08-02 11:25:30 +02:00
Dominik Schürmann
0fd1d5ae4c Move Privileged Extension to separate repo 2016-08-01 23:02:57 +02:00
Daniel Martí
3726b2b7fa gradle: bump support libs to 24.1.1
Minor bugfix release.

Also bump the CI image with the new stuff.
2016-08-01 00:59:24 +02:00
Daniel Martí
d41cfe85d6 gradle: bump buildToolsVersion to 24.0.1 2016-07-31 18:40:06 +02:00
Daniel Martí
217bde1290 gradle: bump checkstyle, robolectric and PMD versions
All minor bugfix releases.
2016-07-31 16:41:25 +02:00
Daniel Martí
f9bfe2a877 Merge branch 'api-24' into 'master'
Api 24

Based on https://gitlab.com/fdroid/fdroidclient/merge_requests/352 with fixes for robolectric

See merge request !360
2016-07-25 12:58:46 +00:00
Daniel Martí
53e812e198 Bump to 0.101-alpha3 2016-07-25 13:19:16 +02:00
Daniel Martí
f17482f1eb Bump compile/target sdk versions to 24 2016-07-13 16:08:55 +01:00
Daniel Martí
8d60e70f5d Bump buildToolsVersion to 24.0.0 2016-07-13 14:59:14 +01:00
Daniel Martí
bd0efe8ffa Bump to 0.101-alpha2 2016-07-06 20:22:02 +01:00
Daniel Martí
6d52bc1022 Revert to build-tools 23 until we can have 64-bit
As long as we're stuck with 32-bit on the buildserver, avoid both target
and build-tools 24. Necessary to do an alpha.
2016-07-06 11:38:25 +01:00
Daniel Martí
7fe15e6c7d PMD: bump to 5.5.0 2016-07-04 11:32:29 +01:00
Daniel Martí
8af44b1af5 checkstyle: bump to 7.0
Remove LITERAL_DO from the config in RightCurly as we want this:

        do {
            foo;
        } while (bar);

Not this:

        do {
            foo;
        }
        while (bar);

This went unnoticed as LITERAL_DO was broken in RightCurly in earlier
Checkstyle versions.
2016-07-04 11:31:41 +01:00
Daniel Martí
3b649138bd Bump buildToolsVersions
The new CI image has 24, not 23.0.3.
2016-06-23 11:42:53 +01:00
Daniel Martí
cd1f59fb29 Bump ACRA to 4.9.0
Also change the overrides from onCreate to init as suggested in the
changelog:

https://github.com/ACRA/acra/wiki/ChangeLog#acra-490-rc-1-2-may-2016

The behaviour should be very similar, although overriding the wrong
method (which we were doing) could cause all sorts of weird issues.
2016-06-21 13:35:29 +01:00
Daniel Martí
26f5286f97 lint: don't unnecessarily disable warnings
Those that are sometimes false positives but could still point out valid
issues should be warnings, not disabled entirely.

The first two are warnings already, the third is an error.
2016-06-21 13:26:56 +01:00
Hans-Christoph Steiner
80b158e7d6 enable build fail on lint error to catch them in CI builds
The spongycastle issue is taking a long time to get resolved, has not yet
affected us, and would be a lot of work to fix in a different way. So the
'InvalidPackage' error is just disabled for now.
2016-06-21 12:52:05 +02:00
Daniel Martí
015343f9df Bump to 0.101-alpha1 2016-06-20 21:52:26 +01:00
Daniel Martí
4fbc327a91 Bump robolectric to 3.1 now that it's out
And remove the now unnecessary -rc justification comment.
2016-06-17 15:51:50 +01:00
Daniel Martí
3d59f4f192 Bump commons-net to 3.5 2016-06-17 15:51:50 +01:00
Daniel Martí
b71cb37cad Bump commons-io to 2.5 2016-06-17 15:51:50 +01:00
Daniel Martí
1ac53078ee Bump support libs to 24.0.0
Also bump the docker image since it contains the newer support m2 repo.
2016-06-17 15:51:25 +01:00
Peter Serwylo
4e73d1e5e6 Finish porting tests to Robolectric, and appease PMD.
To appease PMD, we now have a three rulesets in `config/pmd/*.xml`:

 * `rules.xml`: The bulk of the rules, used by both main and test code.
 * `rules-main.xml`: Rules specific to the andoid client code.
 * `rules-test.xml`: Rules specific to test code.

The rationale is because checkstyle by default checks for "too many static
imports", which is a fair call. However in JUnit4 code, it is common to
import many `assert*` static methods.
2016-06-09 10:44:40 +10:00
Peter Serwylo
4e66bb810f Ported AppProvider tests to Robolectric.
Get around silly `final` methods in `ContentResolver` with Mockito and `delegatesTo`.

The Robolectric library presumes that people always want to test content providers by
manually invoking the `query`/`update`/`delete` methods on the `ShadowContentResolver`.
While that is a great feature for testing, we have helper methods that require testing,
and these methods accept either a _real_ `ContentResolver` or `Context`. Robolectric
did some cool magic in terms of intercepting runtime calls to content resolvers and
forwarding them to the "shadow" verison, to deal with final/package private/etc methods.
However, as a side effect, the `ShadowContentProvider` _is not a `ContentProvider` as
far as the Java compiler is concerned.

By utilising Mockito + `delegatesTo` method, we are able to achieve what is required:
 * An actual `ContentProvider` instance.
 * It forwards calls to the `ShadowContentProvider` provided by Robolectric.
2016-06-09 10:44:40 +10:00
Peter Serwylo
09fd3d188c Robolectric testing support + InstallAppProvider testing now run in JVM.
Robolectric provides testing support for Android via the JVM, including testing
of content providers. In order to get these tests to work, we need to avoid
the default behaviour of starting up FDroidApp.onCreate(). This method has a lot
of static state which fails if set multiple times. Instead of trying to ensure
we correctly zero out that state each test, it is preferable to instead never
bother with that in the first place. Expecially when that is not what is under
test (as is the case with content provider tests).
2016-06-09 10:44:40 +10:00
Daniel Martí
52e4548755 Sync changelog with 0.100 release
Also, bump versionCode to 0.101-alpha0 to allow upgrading from 0.100 to
master.
2016-06-07 21:44:22 +01:00
Daniel Martí
08e067c6ba pmd: bump to 5.4.2
This is a bugfix release where they mostly fixed false positives. No
changes required.
2016-05-30 22:08:19 +01:00
Daniel Martí
d4bb97db72 checkstyle: bump to 6.19
Seems like they finally fixed the hanging throws indent issue.
2016-05-30 22:04:33 +01:00
Hans-Christoph Steiner
d4d5fb1908 Merge branch 'check-repo-index-timestamps' into 'master'
Check repo index timestamps

The Update Framework documents provide a [nice discussion of possible attacks](https://github.com/theupdateframework/tuf/blob/develop/SECURITY.md) against update systems.  One example is a "rollback attack", where the attacker just serves the old signed `index.jar` to keep all clients from updating their apps.  That allows the attacker to exploit known vulnerabilities in those un-updated apps.

While this is a reasonably hard attack, this fix is an important step towards removing the requirement for trusting the web server operator.  Ultimately, it should be able trusting the index signing key only.  Then it doesn't matter were the files come from, it just matters that they are verifiably signed by the index signing key.

This does not address "freeze attacks" since it allows an index update with the same timestamp.  I did that deliberately to slowly ramp up the security checks in order to avoid problems along the way. Code-wise, blocking freeze-attacks is mostly a matter of changing the timestamp check from `<` to `<=`.

See merge request !302
2016-05-21 19:56:49 +00:00
Hans-Christoph Steiner
086ff54b5f move versionCode to app/build.gradle to match versionName
on @mvdan's request
2016-05-20 12:19:17 +02:00
Daniel Martí
30eaf328fd Bump support libs to 23.4.0 2016-05-20 11:12:34 +01:00
Hans-Christoph Steiner
f7c043b3fc set versionName based on git release tag
This makes it easy to tell which debug build a device is running, since the
versionName now automatically describes the exact commit that was built,
based on `git describe`, e.g.:  0.100-alpha7-33-gc2e8e8a

For release builds, i.e. builds from commits that are tagged as releases,
the versionName will be just the tag name: 0.100-alpha8

closes #664 https://gitlab.com/fdroid/fdroidclient/issues/664
2016-05-20 08:42:28 +02:00
Daniel Martí
7de5d4d551 Remove broken test coverage
This never worked properly with the Gitlab UI. Now it's even more broken
since we run the tests in different jobs.
2016-05-12 15:40:47 +01:00
Hans-Christoph Steiner
cff807e191 include useful output logs for failing tests
This helps when tests fail on the gitlab-ci builds.
2016-05-10 14:34:15 +02:00
Daniel Martí
6e9437b1f4 checkstyle: bump to 6.18
Also, forgot to simplify the checkstyle setup in the extension after we
moved from an ant folder hierarchy to a gradle one. Do that now.
2016-05-03 11:36:57 +01:00
Daniel Martí
32c67d05ec PMD: XML config file, enable most of unnecessary 2016-04-23 15:59:04 +01:00