Skip to content

Commit b43b5dd

Browse files
committed
Merge branch 'release/v2.1.0'
2 parents c427f21 + 6bbc2b0 commit b43b5dd

File tree

272 files changed

+18499
-5734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+18499
-5734
lines changed

.github/CONTRIBUTING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
GnuCash Android is built by people like you! Please [join us](https://github.com/codinguser/gnucash-android).
2+
3+
## Git and Pull requests
4+
* Contributions are submitted, reviewed, and accepted using Github pull requests. [Read this article](https://help.github.com/articles/using-pull-requests) for some details. We use the _Fork and Pull_ model, as described there.
5+
* You can maintain your stable installation of GnuCash and test with another installation.
6+
The two instances of GnuCash Android will live side-by-side on your device and not affect each other. You can install the development version by executing `gradle installDD` inside the root project directory
7+
* The latest changes are in the `develop` branch.
8+
* The master branch contains only stable releases.
9+
* Pull requests to the `master` branch will be rejected.
10+
* Make a new branch for every feature you're working on.
11+
* Try to make clean commits that are easily readable (including descriptive commit messages!)
12+
* Test before you push make sure all test pass on your machine.
13+
* Unit tests can be run with `gradle test`
14+
* UI tests can be run with `gradle cDDAT`
15+
* Make small pull requests that are easy to review but make sure they do add value by themselves.
16+
17+
## Coding style
18+
* Do write comments. You don't have to comment every line, but if you come up with something thats a bit complex/weird, just leave a comment. Bear in mind that you will probably leave the project at some point and that other people will read your code. Undocumented huge amounts of code are nearly worthless!
19+
* Please make sure to document every method you write using Javadoc, even if the method seems trivial to you
20+
* See [this guide](http://www.oracle.com/technetwork/articles/java/index-137868.html) on how to write good Javadoc comments
21+
* Don't overengineer. Don't try to solve any possible problem in one step, but try to solve problems as easy as possible and improve the solution over time!
22+
* Do generalize sooner or later! (if an old solution, quickly hacked together, poses more problems than it solves today, refactor it!)
23+
* Keep it compatible. Do not introduce changes to the public API, or configurations too lightly. Don't make incompatible changes without good reasons!
24+
25+
## Translation
26+
* Tranlations for GnuCash Android are managed using [CrowdIn](crowdin.com/project/gnucash-android)
27+
* You can sign up for an account and create/vote for translations.
28+
* Translations will not be accepted via pull requests
29+
30+
## Documentation
31+
* Documentation should be kept up-to-date. This means, whenever you add a new API method, add a new hook or change the database model, pack the relevant changes to the docs in the same pull request.

.github/ISSUE_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#### Expected behaviour
2+
3+
4+
#### Actual behaviour
5+
6+
7+
#### Steps to reproduce the behaviour
8+
1. <!-- List the detail steps to reproduce the problem here -->
9+
10+
#### Software specifications
11+
* GnuCash Android version:
12+
* System Android version:
13+
* Device type:

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ android:
44
components:
55
- platform-tools
66
- tools
7-
- build-tools-23.0.2
7+
- build-tools-23.0.3
88

99
# The SDK version used to compile your project
1010
- android-23

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
Change Log
22
===============================================================================
3+
Version 2.1.0 *(2016-09-01)*
4+
----------------------------
5+
* Feature: Use multiple GnuCash books in single application
6+
* Feature: Backup/Export to ownCloud servers
7+
* Feature: Compact transactions list view for single-entry mode
8+
* Improved: Redesign of passcode screen with included alphabet keys
9+
* Improved: Scheduled transactions now have more accurate timestamps
10+
* Improved: Generate all scheduled transactions even if a scheduled is missed (e.g. device off)
11+
* Improved: Updated translations (and extracted some hard-coded strings)
12+
* Fixed: Accounts lists not properly refreshed after switching between recent and all
13+
* Fixed: Inaccurate execution of some scheduled transactions
14+
315
Version 2.0.7 *(2016-05-05)*
416
----------------------------
517
* Fixed: Currency exchange rate does not accept very small rates (> 2 decimal places)
6-
* Improved: Updated translations for Japanese, Polish, French,
7-
8-
Version 2.0.6 *(2016-02-20)*
18+
* Improved: Updated translations for Japanese, Polish, French, Version 2.0.6 *(2016-02-20)*
919
----------------------------
1020
* Fixed: Saving transaction gets slower with increase in size of database
1121
* Fixed: Imbalance amount wrongly computed in split editor (for some accounts)

CONTRIBUTORS

Lines changed: 0 additions & 32 deletions
This file was deleted.

CONTRIBUTORS.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
GnuCash for Android is a community effort which is made possible by the contributions of
2+
several different people.
3+
Appreciation goes to Muslim Chochlov and the to whole GnuCash community for guiding the
4+
project through the early phases (as Google Summer of Code project 2012) and providing valuable feedback.
5+
6+
### Core Developers:
7+
* Ngewi Fet <[email protected]> - Project maintainer
8+
* Yongxin Wang <[email protected]>
9+
* Oleksandr Tyshkovets <[email protected]>
10+
* Àlex Magaz Graça <[email protected]>
11+
12+
### Other Contributors
13+
The following (incomplete list of) people (in no particular order) contributed (patches and translations) to GnuCash Android:
14+
* Christian Stimming <[email protected]>
15+
* Cristian Marchi <[email protected]>
16+
* Menelaos Maglis <[email protected]>
17+
* Kjell Thomas Pedersen <[email protected]>
18+
* Alexander Galanin <[email protected]>
19+
* Jorge Martínez López <[email protected]>
20+
* Israel Buitron <[email protected]>
21+
* Geert Janssens <[email protected]>
22+
* Nicolas Barranger <[email protected]>
23+
* Sigurd Gartmann <[email protected]>
24+
* Pedro Abel <[email protected]>
25+
* windwarrior <[email protected]>
26+
* Alex Lei <[email protected]>
27+
* Matthew Hague <[email protected]>
28+
* Spanti Nicola <[email protected]>
29+
* Jesse Shieh <[email protected]>
30+
* Terry Chung <[email protected]>
31+
* Caesar Wirth <[email protected]>
32+
* Alceu Rodrigues Neto <[email protected]>
33+
34+
Please visit https://crowdin.com/project/gnucash-android for a more complete list of translation contributions

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Features include:
3333

3434
# Installation
3535

36-
There are different ways to get the GnuCash app for Android; through the app store, or building it yourself.
36+
There are different ways to get the GnuCash app for Android; through
37+
the app store, from github or building it yourself.
3738

3839

3940
### App Store
@@ -42,6 +43,9 @@ There are different ways to get the GnuCash app for Android; through the app sto
4243
<img alt="Android app on Google Play" src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" />
4344
</a>
4445

46+
### From GitHub
47+
48+
Download the .apk from https://github.com/codinguser/gnucash-android/releases
4549

4650
## Building
4751

@@ -55,14 +59,14 @@ the `ANDROID_HOME` environment variable to the location of your SDK. For example
5559

5660
After satisfying those requirements, the build is pretty simple:
5761

58-
* Run `gradlew build installDevelopmentDebug` from the within the project folder.
62+
* Run `./gradlew build installDevelopmentDebug` from the within the project folder.
5963
It will build the project for you and install it to the connected Android device or running emulator.
6064

6165
The app is configured to allow you to install a development and production version in parallel on your device.
6266

6367
### With Android Studio
64-
The easiest way to build is to install [Android Studio](https://developer.android.com/sdk/index.html) v1.+
65-
with [Gradle](https://www.gradle.org/) v2.4.
68+
The easiest way to build is to install [Android Studio](https://developer.android.com/sdk/index.html) v2.+
69+
with [Gradle](https://www.gradle.org/) v2.10
6670
Once installed, then you can import the project into Android Studio:
6771

6872
1. Open `File`
@@ -81,7 +85,7 @@ Google+ Community: https://plus.google.com/communities/104728406764752407046
8185
There are several ways you could contribute to the development.
8286

8387
* One way is providing translations for locales which are not yet available, or improving translations.
84-
See this [blog post](http://www.codinguser.com/2012/09/gnucash-for-android-beta-2-lost-in-translation/) for some guidelines.
88+
Please visit [CrowdIn](https://crowdin.com/project/gnucash-android) in order to update and create new translations
8589

8690
* You could as well contribute code, fixing bugs, new features or automated tests. Pull requests are always welcome.
8791
Take a look at the [bug tracker](https://github.com/codinguser/gnucash-android/issues?state=open)

app/build.gradle

Lines changed: 60 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
import org.apache.tools.ant.taskdefs.condition.Os
2+
13
import java.text.SimpleDateFormat
24

35
apply plugin: 'com.android.application'
46
apply plugin: 'io.fabric'
57

68
def versionMajor = 2
7-
def versionMinor = 0
8-
def versionPatch = 7
9-
def versionBuild = 2
9+
def versionMinor = 1
10+
def versionPatch = 0
11+
def versionBuild = 6
1012

1113
def buildTime() {
1214
def df = new SimpleDateFormat("yyyyMMdd HH:mm 'UTC'")
@@ -21,12 +23,12 @@ def gitSha() {
2123

2224
android {
2325
compileSdkVersion 23
24-
buildToolsVersion "23.0.2"
26+
buildToolsVersion '23.0.3'
2527
defaultConfig {
2628
applicationId "org.gnucash.android"
2729
testApplicationId 'org.gnucash.android.test'
2830
minSdkVersion 10
29-
targetSdkVersion 23 //robolectric tests only support up to API level 21 at the moment
31+
targetSdkVersion 23
3032
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
3133
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
3234
resValue "string", "app_version_name", "${versionName}"
@@ -43,7 +45,7 @@ android {
4345
resValue "string", "dropbox_app_secret", "h2t9fphj3nr4wkw"
4446
resValue "string", "manifest_dropbox_app_key", "db-dhjh8ke9wf05948"
4547
}
46-
testInstrumentationRunner "org.gnucash.android.test.ui.GnucashAndroidTestRunner"
48+
testInstrumentationRunner "org.gnucash.android.test.ui.util.GnucashAndroidTestRunner"
4749

4850
}
4951

@@ -79,8 +81,10 @@ android {
7981
}
8082

8183
buildTypes {
84+
//todo re-enable proguard and test coverage
8285
release {
83-
minifyEnabled false
86+
// minifyEnabled true
87+
// shrinkResources true
8488
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
8589
if (project.hasProperty("RELEASE_STORE_FILE")){
8690
signingConfig signingConfigs.release
@@ -90,6 +94,7 @@ android {
9094
}
9195
debug {
9296
debuggable true
97+
// testCoverageEnabled true
9398
signingConfig signingConfigs.debug
9499
}
95100
}
@@ -142,62 +147,76 @@ def initCrashlyticsPropertiesIfNeeded() {
142147
}
143148
}
144149

145-
def adb = android.getAdbExe().toString()
150+
def adb = Os.isFamily(Os.FAMILY_WINDOWS) ? "..\\scripts\\adb_all.bat" : "../scripts/adb_all.sh"
151+
//def adb = android.getAdbExe().toString()
146152

147153
afterEvaluate {
148154
initCrashlyticsPropertiesIfNeeded()
149155

150-
task grantAnimationPermissionDevel(type: Exec, dependsOn: 'installDevelopmentDebug') { // or install{productFlavour}{buildType}
151-
commandLine "$adb", 'devices'
152-
standardOutput = new ByteArrayOutputStream()
153-
154-
String output = standardOutput.toString()
155-
output.eachLine {
156-
def serial = it.split("\\s")[0]
157-
commandLine "$adb -s $serial shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
158-
commandLine "$adb -s $serial shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
156+
task grantTestPermissionsDevel(type: Exec, dependsOn: 'installDevelopmentDebug') { // or install{productFlavour}{buildType}
157+
if (Os.isFamily(Os.FAMILY_WINDOWS)){
158+
commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE"
159+
// commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE"
160+
} else {
161+
commandLine "$adb shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
162+
// commandLine "$adb shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
159163
}
160164
}
161165

162-
task grantAnimationPermissionProduction(type: Exec, dependsOn: 'installProductionDebug'){
163-
commandLine "$adb -e shell pm grant $android.defaultConfig.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
164-
commandLine "$adb -e shell pm grant $android.defaultConfig.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
166+
task grantTestPermissionsProduction(type: Exec, dependsOn: 'installProductionDebug'){
167+
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
168+
commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE"
169+
commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE"
170+
} else {
171+
commandLine "$adb shell pm grant $android.defaultConfig.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
172+
commandLine "$adb shell pm grant $android.defaultConfig.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
173+
}
165174
}
175+
166176
// When launching individual tests from Android Studio, it seems that only the assemble tasks
167177
// get called directly, not the install* versions
168178
tasks.each { task ->
169179
if (task.name.startsWith('assembleDevelopmentDebugAndroidTest')){
170-
task.dependsOn grantAnimationPermissionDevel
180+
task.dependsOn grantTestPermissionsDevel
171181
} else if (task.name.startsWith('assembleBetaDebugAndroidTest')){
172-
task.dependsOn grantAnimationPermissionProduction
182+
task.dependsOn grantTestPermissionsProduction
173183
} else if (task.name.startsWith('assembleProductionDebugAndroidTest')){
174-
task.dependsOn grantAnimationPermissionProduction
184+
task.dependsOn grantTestPermissionsProduction
175185
}
176186
}
177187
}
178188

179-
def androidSupportVersion = "22.2.1"
180-
def androidEspressoVersion = "2.2"
181-
def androidSupportTestVersion = "0.3"
189+
def androidSupportVersion = "23.3.0"
190+
def androidEspressoVersion = "2.2.2"
191+
def androidSupportTestVersion = "0.5"
192+
193+
repositories{
194+
flatDir{
195+
dirs 'libs'
196+
}
197+
}
182198

183199
dependencies {
184200
compile fileTree(dir: 'libs', include: ['*.jar'])
201+
compile(name:'owncloud_library', ext:'aar')
185202
compile('com.android.support:support-v4:' + androidSupportVersion,
186203
'com.android.support:appcompat-v7:' + androidSupportVersion,
187204
'com.android.support:design:' + androidSupportVersion,
188205
'com.android.support:cardview-v7:' + androidSupportVersion,
206+
'com.android.support:preference-v7:' + androidSupportVersion,
189207
'com.android.support:recyclerview-v7:' + androidSupportVersion,
190208
'com.viewpagerindicator:library:2.4.1@aar',
191-
'com.code-troopers.betterpickers:library:2.0.3',
209+
'com.code-troopers.betterpickers:library:2.5.5',
192210
'org.jraf:android-switch-backport:2.0.1@aar',
193211
'com.github.PhilJay:MPAndroidChart:v2.1.3',
194212
'joda-time:joda-time:2.7',
195-
'com.google.android.gms:play-services-drive:7.0.0',
213+
'com.google.android.gms:play-services-drive:8.3.0',
196214
'com.jakewharton:butterknife:7.0.1',
197-
'com.kobakei:ratethisapp:0.0.3',
198-
'com.squareup:android-times-square:1.6.4@aar',
199-
'com.github.techfreak:wizardpager:1.0.0',
200-
'net.objecthunter:exp4j:0.4.5'
215+
'io.github.kobakei:ratethisapp:1.0.3',
216+
'com.squareup:android-times-square:1.6.5@aar',
217+
'com.github.techfreak:wizardpager:1.0.3',
218+
'net.objecthunter:exp4j:0.4.5',
219+
'org.apache.jackrabbit:jackrabbit-webdav:2.11.1'
201220
)
202221

203222
compile ('com.uservoice:uservoice-android-sdk:1.2.+') {
@@ -210,21 +229,27 @@ dependencies {
210229
transitive = true;
211230
}
212231

213-
testCompile('org.robolectric:robolectric:3.0',
232+
compile 'com.facebook.stetho:stetho:1.3.1'
233+
234+
testCompile('org.robolectric:robolectric:3.1',
214235
'junit:junit:4.12',
215236
'joda-time:joda-time:2.7',
216237
'org.assertj:assertj-core:1.7.1'
217238
)
218239
androidTestCompile ('com.android.support:support-annotations:' + androidSupportVersion,
219240
'com.android.support.test:runner:' + androidSupportTestVersion,
220241
'com.android.support.test:rules:' + androidSupportTestVersion,
221-
'com.android.support.test.espresso:espresso-core:' + androidEspressoVersion)
242+
'com.android.support.test.espresso:espresso-core:' + androidEspressoVersion,
243+
'com.android.support.test.espresso:espresso-intents:' + androidEspressoVersion,
244+
//the following are only added so that the app and test version both us the same versions
245+
'com.android.support:appcompat-v7:' + androidSupportVersion,
246+
'com.android.support:design:' + androidSupportVersion)
222247
androidTestCompile ('com.android.support.test.espresso:espresso-contrib:' + androidEspressoVersion) {
223248
exclude group: 'com.android.support', module: 'support-v4'
224249
exclude module: 'recyclerview-v7'
225250
}
226251

227-
androidTestCompile('com.squareup.assertj:assertj-android:1.1.0'){
252+
androidTestCompile('com.squareup.assertj:assertj-android:1.1.1'){
228253
exclude group: 'com.android.support', module:'support-annotations'
229254
}
230255
}

app/libs/owncloud_library.aar

143 KB
Binary file not shown.

app/proguard-project.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636

3737
-keepnames class * implements android.os.Parcelable {
3838
public static final ** CREATOR;
39-
}
39+
}

0 commit comments

Comments
 (0)