Added Travis CI & Coveralls.

This commit is contained in:
Iiro Krankka
2017-01-09 12:52:38 +02:00
parent 128cd1af51
commit f0d2009b9c
3 changed files with 32 additions and 0 deletions

21
.travis.yml Normal file
View File

@@ -0,0 +1,21 @@
language: android
android:
components:
- tools
- platform-tools
- build-tools-25.0.0
- android-25
- extra-android-m2repository
jdk:
oraclejdk8
before_script:
- echo no | android create avd --force -n test -t android-18 --abi armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- ./gradlew createDebugCoverageReport coveralls

View File

@@ -1,4 +1,5 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'com.github.kt3k.coveralls'
android { android {
compileSdkVersion 25 compileSdkVersion 25
@@ -41,3 +42,12 @@ dependencies {
compile 'com.android.support:appcompat-v7:25.0.1' compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1' compile 'com.android.support:recyclerview-v7:25.0.1'
} }
coveralls {
jacocoReportPath = "${buildDir}/reports/coverage/debug/report.xml"
}
tasks.coveralls {
dependsOn 'createDebugCoverageReport'
onlyIf { System.env.'CI' }
}

View File

@@ -6,6 +6,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.2.1' classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files