diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b69eae9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,49 @@ +language: android +sudo: required +jdk: oraclejdk8 +env: + global: + - ANDROID_TARGET=android-28 + - ANDROID_ABI=armeabi-v7a + - CODECOV_TOKEN=f93aa7c8-1579-4687-870f-cc6e08a93316 +android: + components: + - tools + - platform-tools + - build-tools-28.0.0 + - android-28 + - extra-google-google_play_services + - extra-google-m2repository + - extra-android-m2repository + - $ANDROID_TARGET + - sys-img-${ANDROID_ABI}-${ANDROID_TARGET} + +licenses: + - 'android-sdk-license-.+' + +before_install: + - yes | sdkmanager "platforms;android-28" + - chmod +x ./gradlew + - mkdir "$ANDROID_HOME/licenses" || true + - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license" + - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license" + - yes | sdkmanager --update + - yes | sdkmanager --licenses + +script: + - echo "Hello! This is Travis" + - ./gradlew build jacocoTestReport + +after_success: + - bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} + + +before_cache: + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ + +cache: + directories: + - $HOME/.gradle/caches/ + - $HOME/.gradle/wrapper/ + - $HOME/.android/build-cache \ No newline at end of file diff --git a/README.md b/README.md index 52259b2..1b695ee 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[](https://travis-ci.org/crowded-geek/offix-android) +[](https://codecov.io/gh/crowded-geek/offix-android)
diff --git a/offix/build.gradle b/offix/build.gradle
index 57776c0..3bc32a3 100644
--- a/offix/build.gradle
+++ b/offix/build.gradle
@@ -3,6 +3,7 @@ apply plugin: 'com.apollographql.android'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
+apply plugin: 'jacoco-android'
buildscript {
repositories {
@@ -11,6 +12,7 @@ buildscript {
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
+ classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4'
}
}