diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f14ae53f2..8fef40743 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ Please Add Screenshots If any UI changes. Please make sure these boxes are checked before submitting your pull request - thanks! -- [ ] Apply the `MifosStyle.xml` style template to your code in Android Studio. +- [ ] Apply the `AndroidStyle.xml` style template to your code in Android Studio. - [ ] Run the unit tests with `./gradlew check` to make sure you didn't break anything diff --git a/.travis.yml b/.travis.yml index f5ce55294..41e03a9f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,16 @@ android: - extra-google-m2repository - build-tools-24.0.2 - android-25 + - android-22 + - sys-img-armeabi-v7a-android-22 -script: "./gradlew build --stacktrace" +before_script: + - echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a + - emulator -avd test -no-skin -no-audio -no-window & + - android-wait-for-emulator + - adb shell input keyevent 82 & + +script: "./gradlew build connectedAndroidTest --stacktrace" # gitter integration notifications: diff --git a/AndroidStyle.xml b/AndroidStyle.xml new file mode 100644 index 000000000..c612e654d --- /dev/null +++ b/AndroidStyle.xml @@ -0,0 +1,328 @@ + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index d33ccadce..dd4f2b8fb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -101,4 +101,19 @@ dependencies { // Unit tests dependencies testCompile "junit:junit:$rootProject.jUnitVersion" testCompile "org.mockito:mockito-core:$rootProject.mockitoVersion" + + androidTestCompile "junit:junit:$rootProject.jUnitVersion" + androidTestCompile "org.mockito:mockito-core:$rootProject.mockitoVersion" + androidTestCompile "org.mockito:mockito-android:$rootProject.mockitoVersion" + androidTestCompile "com.android.support:support-annotations:$rootProject.supportLibraryVersion" + androidTestCompile("com.android.support.test.espresso:espresso-contrib:$rootProject.espressoVersion") { + exclude group: 'com.android.support', module: 'appcompat' + exclude group: 'com.android.support', module: 'support-v4' + exclude group: 'com.android.support', module: 'recyclerview-v7' + exclude group: 'com.android.support', module: 'design' + exclude group: 'com.android.support', module: 'support-annotations' + } + androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.espressoVersion" + androidTestCompile "com.android.support.test:runner:$rootProject.runnerVersion" + androidTestCompile "com.android.support.test:rules:$rootProject.rulesVersion" } diff --git a/build.gradle b/build.gradle index aa425b8ae..5b8a069e3 100644 --- a/build.gradle +++ b/build.gradle @@ -42,4 +42,7 @@ ext { jUnitVersion = '4.12' mockitoVersion = '2.6.2' + runnerVersion = '0.5' + rulesVersion = '0.5' + espressoVersion = '2.2.2' }