Skip to content

Commit

Permalink
- Circle CI integration
Browse files Browse the repository at this point in the history
  • Loading branch information
MayconCardoso committed May 6, 2020
1 parent 6d05693 commit 3190d38
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 2
jobs:
build:
working_directory: ~/code
docker:
- image: circleci/android:api-29
environment:
JVM_OPTS: -Xmx3200m

steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}

- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}

- run:
name: Generate all unit test reports
command: ./gradlew clean jacocoTestReport jacocoTestReportDebug --no-daemon

- run:
name: Submit Code Coverage results to codecov.io
command: bash <(curl -s https://codecov.io/bash)

- store_artifacts:
path: app/build/reports

- store_test_results:
path: app/build/test-results

- store_artifacts:
path: app/build/reports
2 changes: 2 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'androidx.navigation.safeargs'
apply plugin: 'com.adarshr.test-logger'


android {
defaultConfig {
Expand Down
13 changes: 12 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ buildscript {
repositories {
google()
jcenter()

maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0"
classpath "com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0"
classpath 'com.adarshr:gradle-test-logger-plugin:2.0.0'
}
}

Expand Down Expand Up @@ -66,3 +70,10 @@ subprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}


apply plugin: "com.vanniktech.android.junit.jacoco"

junitJacoco {
jacocoVersion = '0.8.2' // type String
}
1 change: 1 addition & 0 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.adarshr.test-logger'

dependencies {
implementation project(path: submodulesLibraries.logger)
Expand Down
1 change: 1 addition & 0 deletions domain/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'kotlin'
apply plugin: 'com.adarshr.test-logger'

dependencies {
implementation project(path: submodulesLibraries.logger)
Expand Down
1 change: 1 addition & 0 deletions features/feature-stock-share-filter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.adarshr.test-logger'

android {
dataBinding {
Expand Down
2 changes: 2 additions & 0 deletions features/feature-stock-share/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.adarshr.test-logger'


android {
dataBinding {
Expand Down
1 change: 1 addition & 0 deletions features/feature-timeline-balance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.adarshr.test-logger'

android {
dataBinding {
Expand Down
4 changes: 1 addition & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

android.enableUnitTestBinaryResources=true
kotlin.code.style=official
Empty file modified gradlew
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions libraries/library-architecture-code-generator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.adarshr.test-logger'

dependencies {
implementation globalDependencies.kotlinStdLib
Expand Down
1 change: 1 addition & 0 deletions libraries/library-design-system/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.adarshr.test-logger'

android {
dataBinding {
Expand Down
2 changes: 1 addition & 1 deletion libraries/library-logger-android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

apply plugin: 'com.adarshr.test-logger'

dependencies {
implementation globalDependencies.kotlinStdLib
Expand Down
1 change: 1 addition & 0 deletions libraries/library-logger/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'kotlin'
apply plugin: 'com.adarshr.test-logger'

dependencies {
implementation globalDependencies.kotlinStdLib
Expand Down
1 change: 1 addition & 0 deletions testing/testing-data-factory/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'kotlin'
apply plugin: 'com.adarshr.test-logger'

dependencies {
implementation project(path: submodulesPlatform.domain)
Expand Down

0 comments on commit 3190d38

Please sign in to comment.