178 Commits

Author SHA1 Message Date
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
Daniel Martí
a484c03816 PMD: Re-enable on test files
This used to be the case, which is why only minimal changes were
required to bring it back. This also makes it take the same files that
checkstyle does, which is more consistent.
2016-04-23 01:45:04 +01:00
Daniel Martí
00c138e42f PMD: enable and obey java-unusedcode 2016-04-23 01:16:14 +01:00
Daniel Martí
132519590f Bump accesspoint library to 0.2.0
This release allows for Android 6+ support, but we'll need to ask for
permissions at runtime too. This commit simply does one half of the work
needed to support Android 6 with all things wi-fi.

See the issue and example app commit for reference:

https://github.com/mvdan/accesspoint/issues/6
6284f0376b
2016-04-14 15:31:47 +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í
127c65b78d Bump support libs to 23.3.0
Also bump the CI image to include the updated support lib maven repo.
2016-04-14 15:31:47 +01:00
Daniel Martí
db798afb67 PMD: Do all java files like checkstyle
Not just the org.fdroid.* classes. No changes needed.
2016-04-14 15:31:47 +01:00
Hans-Christoph Steiner
22e40bfee1 port all but Provider tests to JUnit4 semantics
Android recently switched from JUnit 3 to 4 for its base testing classes.
It doesn't seem to support the old JUnit3 methods with gradle and AS. So
all the tests need to be ported to JUnit4 to work again.

#607 https://gitlab.com/fdroid/fdroidclient/issues/607
2016-04-11 11:26:21 -04:00
Hans-Christoph Steiner
70864e3479 use custom proguard config for running tests
The new Android Testing Support library stuff causes proguard to freak
out, so make proguard ignore all that stuff when running tests.
2016-04-05 12:44:01 +02:00
Daniel Martí
53c8752444 Update to april 5th docker image
* Debian 8.4
* Now includes curl
* No longer has android-10
* build-tools 23.0.3
2016-04-05 10:43:48 +01:00
Hans-Christoph Steiner
bc3d8a89b6 add tests of HttpDownloader 2016-04-04 10:53:12 +02:00
Daniel Martí
fddce692db PMD: Get closer to obeying unnecessary
Don't enable it just yet, it's way too pedantic with parenthesis.
2016-03-31 21:54:11 +01:00
Daniel Martí
0e76a2e1fe Fix source directories after gradle layout switch
'src' works because we're only doing java files under that directory.
But it would be slower than needed, and in the case of PMD it would also
use the test files which wasn't intended at all.
2016-03-31 21:40:33 +01:00
Daniel Martí
f34237f333 Remove duplicated commons-io dep
It seems like having it as a compile dependency already works for the
tests. Having it duplicated seems to sometimes trigger errors (e.g. a
user reported a duplicate zip entry due to the duplication) and might
also be problematic if we don't keep the two versions in sync.
2016-03-31 12:01:58 +01:00
Daniel Martí
58c23c0a0e Fix binaryDeps with new app folder
Little remaining breakage in our main build.gradle. Went unnoticed
because we rarely use this. And hopefully we can get rid of it soon.
2016-03-29 17:57:21 +01:00
Daniel Martí
d5456e1bbf Bump ACRA to 4.8.5
Minor bugfix release.
2016-03-29 17:54:24 +01:00
Daniel Martí
db2aaeaf22 Bump checkstyle to 6.17
No changes were necessary to keep it happy.
2016-03-29 17:46:37 +01:00
Hans-Christoph Steiner
88b5e284b5 use commons-io via a gradle dependency
This makes it so gradle provides all dependencies, rather than a mix of
classes that are copied in versus imported via gradle.  This library is
already used by the tests, so its not really a new dependency, and proguard
should remove all the unused stuff.
2016-03-29 14:06:52 +02:00
Hans-Christoph Steiner
3fcdfe85bb move main project files into standard gradle/Android Studio layout
This makes it a lot easier to setup all the testing stuff.  Mostly,
I'm tired of fighting Android Studio's fragility, so I want to remove
as much non-standardness as possible in the hopes of improving that
situation.

closes #534 https://gitlab.com/fdroid/fdroidclient/issues/534
2016-03-28 12:12:37 +02:00