Skip to content

Commit

Permalink
Merge branch 'release/v2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
codinguser committed Sep 5, 2016
2 parents c427f21 + 6bbc2b0 commit b43b5dd
Show file tree
Hide file tree
Showing 272 changed files with 18,499 additions and 5,734 deletions.
31 changes: 31 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
GnuCash Android is built by people like you! Please [join us](https://github.com/codinguser/gnucash-android).

## Git and Pull requests
* 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.
* You can maintain your stable installation of GnuCash and test with another installation.
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
* The latest changes are in the `develop` branch.
* The master branch contains only stable releases.
* Pull requests to the `master` branch will be rejected.
* Make a new branch for every feature you're working on.
* Try to make clean commits that are easily readable (including descriptive commit messages!)
* Test before you push make sure all test pass on your machine.
* Unit tests can be run with `gradle test`
* UI tests can be run with `gradle cDDAT`
* Make small pull requests that are easy to review but make sure they do add value by themselves.

## Coding style
* 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!
* Please make sure to document every method you write using Javadoc, even if the method seems trivial to you
* See [this guide](http://www.oracle.com/technetwork/articles/java/index-137868.html) on how to write good Javadoc comments
* 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!
* Do generalize sooner or later! (if an old solution, quickly hacked together, poses more problems than it solves today, refactor it!)
* Keep it compatible. Do not introduce changes to the public API, or configurations too lightly. Don't make incompatible changes without good reasons!

## Translation
* Tranlations for GnuCash Android are managed using [CrowdIn](crowdin.com/project/gnucash-android)
* You can sign up for an account and create/vote for translations.
* Translations will not be accepted via pull requests

## Documentation
* 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.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#### Expected behaviour


#### Actual behaviour


#### Steps to reproduce the behaviour
1. <!-- List the detail steps to reproduce the problem here -->

#### Software specifications
* GnuCash Android version:
* System Android version:
* Device type:
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android:
components:
- platform-tools
- tools
- build-tools-23.0.2
- build-tools-23.0.3

# The SDK version used to compile your project
- android-23
Expand Down
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
Change Log
===============================================================================
Version 2.1.0 *(2016-09-01)*
----------------------------
* Feature: Use multiple GnuCash books in single application
* Feature: Backup/Export to ownCloud servers
* Feature: Compact transactions list view for single-entry mode
* Improved: Redesign of passcode screen with included alphabet keys
* Improved: Scheduled transactions now have more accurate timestamps
* Improved: Generate all scheduled transactions even if a scheduled is missed (e.g. device off)
* Improved: Updated translations (and extracted some hard-coded strings)
* Fixed: Accounts lists not properly refreshed after switching between recent and all
* Fixed: Inaccurate execution of some scheduled transactions

Version 2.0.7 *(2016-05-05)*
----------------------------
* Fixed: Currency exchange rate does not accept very small rates (> 2 decimal places)
* Improved: Updated translations for Japanese, Polish, French,

Version 2.0.6 *(2016-02-20)*
* Improved: Updated translations for Japanese, Polish, French, Version 2.0.6 *(2016-02-20)*
----------------------------
* Fixed: Saving transaction gets slower with increase in size of database
* Fixed: Imbalance amount wrongly computed in split editor (for some accounts)
Expand Down
32 changes: 0 additions & 32 deletions CONTRIBUTORS

This file was deleted.

34 changes: 34 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
GnuCash for Android is a community effort which is made possible by the contributions of
several different people.
Appreciation goes to Muslim Chochlov and the to whole GnuCash community for guiding the
project through the early phases (as Google Summer of Code project 2012) and providing valuable feedback.

### Core Developers:
* Ngewi Fet <ngewif@gmail.com> - Project maintainer
* Yongxin Wang <fefe.wyx@gmail.com>
* Oleksandr Tyshkovets <olexandr.tyshkovets@gmail.com>
* Àlex Magaz Graça <rivaldi8@gmail.com>

### Other Contributors
The following (incomplete list of) people (in no particular order) contributed (patches and translations) to GnuCash Android:
* Christian Stimming <christian@cstimming.de>
* Cristian Marchi <cri.penta@gmail.com>
* Menelaos Maglis <mmaglis@metacom.gr>
* Kjell Thomas Pedersen <kjelltp@gmail.com>
* Alexander Galanin <al@galanin.nnov.ru>
* Jorge Martínez López <jorgeml@gmail.com>
* Israel Buitron <israel.buitron@gmail.com>
* Geert Janssens <janssens-geert@telenet.be>
* Nicolas Barranger <wicowyn@gmail.com>
* Sigurd Gartmann <sigurdga-github@sigurdga.no>
* Pedro Abel <pedroabel@gmail.com>
* windwarrior <lennartbuit@gmail.com>
* Alex Lei <lxbzmy@gmail.com>
* Matthew Hague <matthewhague@zoho.com>
* Spanti Nicola <rydroid_dev@yahoo.com>
* Jesse Shieh <jesse.shieh.pub@gmail.com>
* Terry Chung <terrywmc@gmail.com>
* Caesar Wirth <cjwirth@gmail.com>
* Alceu Rodrigues Neto <alceurneto@gmail.com>

Please visit https://crowdin.com/project/gnucash-android for a more complete list of translation contributions
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Features include:

# Installation

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


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

### From GitHub

Download the .apk from https://github.com/codinguser/gnucash-android/releases

## Building

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

After satisfying those requirements, the build is pretty simple:

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

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

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

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

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

* You could as well contribute code, fixing bugs, new features or automated tests. Pull requests are always welcome.
Take a look at the [bug tracker](https://github.com/codinguser/gnucash-android/issues?state=open)
Expand Down
95 changes: 60 additions & 35 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import org.apache.tools.ant.taskdefs.condition.Os

import java.text.SimpleDateFormat

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

def versionMajor = 2
def versionMinor = 0
def versionPatch = 7
def versionBuild = 2
def versionMinor = 1
def versionPatch = 0
def versionBuild = 6

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

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "org.gnucash.android"
testApplicationId 'org.gnucash.android.test'
minSdkVersion 10
targetSdkVersion 23 //robolectric tests only support up to API level 21 at the moment
targetSdkVersion 23
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
resValue "string", "app_version_name", "${versionName}"
Expand All @@ -43,7 +45,7 @@ android {
resValue "string", "dropbox_app_secret", "h2t9fphj3nr4wkw"
resValue "string", "manifest_dropbox_app_key", "db-dhjh8ke9wf05948"
}
testInstrumentationRunner "org.gnucash.android.test.ui.GnucashAndroidTestRunner"
testInstrumentationRunner "org.gnucash.android.test.ui.util.GnucashAndroidTestRunner"

}

Expand Down Expand Up @@ -79,8 +81,10 @@ android {
}

buildTypes {
//todo re-enable proguard and test coverage
release {
minifyEnabled false
// minifyEnabled true
// shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")){
signingConfig signingConfigs.release
Expand All @@ -90,6 +94,7 @@ android {
}
debug {
debuggable true
// testCoverageEnabled true
signingConfig signingConfigs.debug
}
}
Expand Down Expand Up @@ -142,62 +147,76 @@ def initCrashlyticsPropertiesIfNeeded() {
}
}

def adb = android.getAdbExe().toString()
def adb = Os.isFamily(Os.FAMILY_WINDOWS) ? "..\\scripts\\adb_all.bat" : "../scripts/adb_all.sh"
//def adb = android.getAdbExe().toString()

afterEvaluate {
initCrashlyticsPropertiesIfNeeded()

task grantAnimationPermissionDevel(type: Exec, dependsOn: 'installDevelopmentDebug') { // or install{productFlavour}{buildType}
commandLine "$adb", 'devices'
standardOutput = new ByteArrayOutputStream()

String output = standardOutput.toString()
output.eachLine {
def serial = it.split("\\s")[0]
commandLine "$adb -s $serial shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
commandLine "$adb -s $serial shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
task grantTestPermissionsDevel(type: Exec, dependsOn: 'installDevelopmentDebug') { // or install{productFlavour}{buildType}
if (Os.isFamily(Os.FAMILY_WINDOWS)){
commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE"
// commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE"
} else {
commandLine "$adb shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
// commandLine "$adb shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
}
}

task grantAnimationPermissionProduction(type: Exec, dependsOn: 'installProductionDebug'){
commandLine "$adb -e shell pm grant $android.defaultConfig.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
commandLine "$adb -e shell pm grant $android.defaultConfig.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
task grantTestPermissionsProduction(type: Exec, dependsOn: 'installProductionDebug'){
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.SET_ANIMATION_SCALE"
commandLine "cmd", "/c", "$adb", "shell pm grant $android.productFlavors.development.applicationId android.permission.WRITE_EXTERNAL_STORAGE"
} else {
commandLine "$adb shell pm grant $android.defaultConfig.applicationId android.permission.SET_ANIMATION_SCALE".split(' ')
commandLine "$adb shell pm grant $android.defaultConfig.applicationId android.permission.WRITE_EXTERNAL_STORAGE".split(' ')
}
}

// When launching individual tests from Android Studio, it seems that only the assemble tasks
// get called directly, not the install* versions
tasks.each { task ->
if (task.name.startsWith('assembleDevelopmentDebugAndroidTest')){
task.dependsOn grantAnimationPermissionDevel
task.dependsOn grantTestPermissionsDevel
} else if (task.name.startsWith('assembleBetaDebugAndroidTest')){
task.dependsOn grantAnimationPermissionProduction
task.dependsOn grantTestPermissionsProduction
} else if (task.name.startsWith('assembleProductionDebugAndroidTest')){
task.dependsOn grantAnimationPermissionProduction
task.dependsOn grantTestPermissionsProduction
}
}
}

def androidSupportVersion = "22.2.1"
def androidEspressoVersion = "2.2"
def androidSupportTestVersion = "0.3"
def androidSupportVersion = "23.3.0"
def androidEspressoVersion = "2.2.2"
def androidSupportTestVersion = "0.5"

repositories{
flatDir{
dirs 'libs'
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name:'owncloud_library', ext:'aar')
compile('com.android.support:support-v4:' + androidSupportVersion,
'com.android.support:appcompat-v7:' + androidSupportVersion,
'com.android.support:design:' + androidSupportVersion,
'com.android.support:cardview-v7:' + androidSupportVersion,
'com.android.support:preference-v7:' + androidSupportVersion,
'com.android.support:recyclerview-v7:' + androidSupportVersion,
'com.viewpagerindicator:library:2.4.1@aar',
'com.code-troopers.betterpickers:library:2.0.3',
'com.code-troopers.betterpickers:library:2.5.5',
'org.jraf:android-switch-backport:2.0.1@aar',
'com.github.PhilJay:MPAndroidChart:v2.1.3',
'joda-time:joda-time:2.7',
'com.google.android.gms:play-services-drive:7.0.0',
'com.google.android.gms:play-services-drive:8.3.0',
'com.jakewharton:butterknife:7.0.1',
'com.kobakei:ratethisapp:0.0.3',
'com.squareup:android-times-square:1.6.4@aar',
'com.github.techfreak:wizardpager:1.0.0',
'net.objecthunter:exp4j:0.4.5'
'io.github.kobakei:ratethisapp:1.0.3',
'com.squareup:android-times-square:1.6.5@aar',
'com.github.techfreak:wizardpager:1.0.3',
'net.objecthunter:exp4j:0.4.5',
'org.apache.jackrabbit:jackrabbit-webdav:2.11.1'
)

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

testCompile('org.robolectric:robolectric:3.0',
compile 'com.facebook.stetho:stetho:1.3.1'

testCompile('org.robolectric:robolectric:3.1',
'junit:junit:4.12',
'joda-time:joda-time:2.7',
'org.assertj:assertj-core:1.7.1'
)
androidTestCompile ('com.android.support:support-annotations:' + androidSupportVersion,
'com.android.support.test:runner:' + androidSupportTestVersion,
'com.android.support.test:rules:' + androidSupportTestVersion,
'com.android.support.test.espresso:espresso-core:' + androidEspressoVersion)
'com.android.support.test.espresso:espresso-core:' + androidEspressoVersion,
'com.android.support.test.espresso:espresso-intents:' + androidEspressoVersion,
//the following are only added so that the app and test version both us the same versions
'com.android.support:appcompat-v7:' + androidSupportVersion,
'com.android.support:design:' + androidSupportVersion)
androidTestCompile ('com.android.support.test.espresso:espresso-contrib:' + androidEspressoVersion) {
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}

androidTestCompile('com.squareup.assertj:assertj-android:1.1.0'){
androidTestCompile('com.squareup.assertj:assertj-android:1.1.1'){
exclude group: 'com.android.support', module:'support-annotations'
}
}
Binary file added app/libs/owncloud_library.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion app/proguard-project.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@

-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
}
Loading

0 comments on commit b43b5dd

Please sign in to comment.