This repository was archived by the owner on Oct 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-12
lines changed Expand file tree Collapse file tree 4 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ android:
2121 - tools
2222
2323before_script : echo y | ${ANDROID_HOME}tools/bin/sdkmanager --channel=3 "tools" "platform-tools" "platforms;android-27"
24- script : ./gradlew build jacocoTestReport :easypermissions:test
24+ script : ./gradlew build jacocoTestReportRelease :easypermissions:test
2525
2626after_failure :
2727 - cat app/build/reports/tests/testDebugUnitTest/index.html
Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ buildscript {
22 repositories {
33 jcenter()
44 google()
5+ mavenCentral()
56 }
67
78 dependencies {
89 classpath ' com.android.tools.build:gradle:3.2.1'
910 classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
10- classpath ' com.dicedmelon.gradle:jacoco -android:0.1.3 '
11+ classpath ' com.vanniktech:gradle -android-junit-jacoco-plugin :0.13.0 '
1112 }
1213}
1314
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
2- apply plugin : ' jacoco- android'
2+ apply plugin : " com.vanniktech. android.junit.jacoco "
33
44android {
55 compileSdkVersion compileSdk
@@ -28,21 +28,20 @@ android {
2828 }
2929}
3030
31+ junitJacoco {
32+ includeNoLocationClasses = true
33+ }
34+
3135dependencies {
3236 api " com.android.support:appcompat-v7:$support_library_version "
3337 api " com.android.support:support-compat:$support_library_version "
3438 api " com.android.support:support-fragment:$support_library_version "
3539
3640 testImplementation ' junit:junit:4.12'
3741 testImplementation ' com.google.truth:truth:0.42'
38- testImplementation ' org.robolectric:robolectric:3.8'
39- testImplementation ' org.robolectric:shadows-supportv4:3.8'
40- testImplementation ' org.mockito:mockito-core:2.18.0'
41- }
42-
43- // Needed in order to process Robolectric tests when running JaCoCo
44- tasks. withType(Test ) {
45- jacoco. includeNoLocationClasses = true
42+ testImplementation ' org.robolectric:robolectric:4.1'
43+ testImplementation ' org.robolectric:shadows-supportv4:4.1'
44+ testImplementation ' org.mockito:mockito-core:2.23.4'
4645}
4746
4847apply from : ' bintray.gradle'
Original file line number Diff line number Diff line change @@ -19,4 +19,7 @@ org.gradle.jvmargs=-Xmx1536m
1919# org.gradle.parallel=true
2020
2121# Configure on demand
22- org.gradle.configureondemand =true
22+ org.gradle.configureondemand =true
23+
24+ # Required by Robolectric 4.x
25+ android.enableUnitTestBinaryResources =true
You can’t perform that action at this time.
0 commit comments