From 1512f4cb7ce82525a15512292025baa86e75d841 Mon Sep 17 00:00:00 2001 From: sayam Date: Sun, 29 Dec 2019 03:07:11 +0530 Subject: [PATCH 1/8] Added Travis Ci and Codecov --- .travis.yml | 28 ++++++++++++++++++++++++++++ sample/build.gradle | 12 ++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..12a914e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +language: android +dist: trusty + +android: + components: + - android-28 + - tools + - build-tools-28.0.0 + - extra-android-m2repository + - extra-android-m2repository + - extra-google-google_play_services + - $ANDROID_TARGET + - sys-img-${ANDROID_ABI}-${ANDROID_TARGET} + +script: + - ./gradlew build jacocoTestReport + +before_install: + - chmod +x gradlew + +after_success: + - bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} + +licenses: + - 'android-sdk-license-.+' + - 'google-gdk-license-.+' + + diff --git a/sample/build.gradle b/sample/build.gradle index 0bb25da..05a8ce7 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -7,6 +7,18 @@ apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android-extensions' +// Jacoco Plugin +apply plugin: 'jacoco-android' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1' + } +} + android { compileSdkVersion 28 From 8465147066904197c5fc3ad85ad2687de6486c72 Mon Sep 17 00:00:00 2001 From: sayam Date: Sun, 29 Dec 2019 03:15:37 +0530 Subject: [PATCH 2/8] Added Token --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 12a914e..4f07472 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,11 @@ language: android dist: trusty +env: + global: + - ANDROID_TARGET=android-28 + - CODECOV_TOKEN=52bcf07f-611f-47cc-81f5-e86d77d6fcb7 + android: components: - android-28 From c123edc3691c4cfa272b236207d43ec78a14df94 Mon Sep 17 00:00:00 2001 From: sayam Date: Sun, 29 Dec 2019 03:17:27 +0530 Subject: [PATCH 3/8] . --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f07472..be95f0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,8 +26,4 @@ before_install: after_success: - bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} -licenses: - - 'android-sdk-license-.+' - - 'google-gdk-license-.+' - From 48a0520b719a60d1988cea9a2eb97176a59db635 Mon Sep 17 00:00:00 2001 From: sayam Date: Sun, 29 Dec 2019 03:25:07 +0530 Subject: [PATCH 4/8] License accepted --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index be95f0c..29d45b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ dist: trusty env: global: - ANDROID_TARGET=android-28 + - ANDROID_ABI=armeabi-v7a - CODECOV_TOKEN=52bcf07f-611f-47cc-81f5-e86d77d6fcb7 android: @@ -17,13 +18,17 @@ android: - $ANDROID_TARGET - sys-img-${ANDROID_ABI}-${ANDROID_TARGET} +licenses: + - 'android-sdk-license-.+' + script: - ./gradlew build jacocoTestReport before_install: - chmod +x gradlew + - yes | sdkmanager "platforms;android-28" -after_success: +after_success: - bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} From ea629a100bdb447a7ca35903ff880933c58a6132 Mon Sep 17 00:00:00 2001 From: sayam Date: Sun, 29 Dec 2019 03:31:33 +0530 Subject: [PATCH 5/8] fixed --- .travis.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.travis.yml b/.travis.yml index 29d45b7..7cbc65b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ android: components: - android-28 - tools + - platform-tools - build-tools-28.0.0 - extra-android-m2repository - extra-android-m2repository @@ -27,8 +28,20 @@ script: before_install: - chmod +x gradlew - yes | sdkmanager "platforms;android-28" + - yes | sdkmanager --licenses + - yes | sdkmanager --update 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 + From e631c8f4fb5b2bf84aeac38333ac34cb8248bbdc Mon Sep 17 00:00:00 2001 From: sayam Date: Sun, 29 Dec 2019 03:36:30 +0530 Subject: [PATCH 6/8] fixed 2.0 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7cbc65b..60c0980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,6 @@ script: before_install: - chmod +x gradlew - yes | sdkmanager "platforms;android-28" - - yes | sdkmanager --licenses - yes | sdkmanager --update after_success: From 91194a396561304fb7f40ee8a6585853dffdbf98 Mon Sep 17 00:00:00 2001 From: sayam Date: Sun, 29 Dec 2019 04:48:44 +0530 Subject: [PATCH 7/8] Upgraded Jacoco Version --- sample/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sample/build.gradle b/sample/build.gradle index 05a8ce7..7d887cb 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -15,7 +15,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1' + classpath 'com.dicedmelon.gradle:jacoco-android:0.1.4' } } From cb4d598484080f3d8148411118d26d5b31773e82 Mon Sep 17 00:00:00 2001 From: sayam sawai Date: Sun, 29 Dec 2019 05:23:01 +0530 Subject: [PATCH 8/8] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 52259b2..f0b72ff 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Build Status](https://travis-ci.com/sayamss/offix-android.svg?branch=codecov)](https://travis-ci.com/sayamss/offix-android) +[![codecov](https://codecov.io/gh/sayamss/offix-android/branch/codecov/graph/badge.svg)](https://codecov.io/gh/sayamss/offix-android) +