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:
21
21
- tools
22
22
23
23
before_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
25
25
26
26
after_failure :
27
27
- cat app/build/reports/tests/testDebugUnitTest/index.html
Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ buildscript {
2
2
repositories {
3
3
jcenter()
4
4
google()
5
+ mavenCentral()
5
6
}
6
7
7
8
dependencies {
8
9
classpath ' com.android.tools.build:gradle:3.2.1'
9
10
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 '
11
12
}
12
13
}
13
14
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.library'
2
- apply plugin : ' jacoco- android'
2
+ apply plugin : " com.vanniktech. android.junit.jacoco "
3
3
4
4
android {
5
5
compileSdkVersion compileSdk
@@ -28,21 +28,20 @@ android {
28
28
}
29
29
}
30
30
31
+ junitJacoco {
32
+ includeNoLocationClasses = true
33
+ }
34
+
31
35
dependencies {
32
36
api " com.android.support:appcompat-v7:$support_library_version "
33
37
api " com.android.support:support-compat:$support_library_version "
34
38
api " com.android.support:support-fragment:$support_library_version "
35
39
36
40
testImplementation ' junit:junit:4.12'
37
41
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'
46
45
}
47
46
48
47
apply from : ' bintray.gradle'
Original file line number Diff line number Diff line change @@ -19,4 +19,7 @@ org.gradle.jvmargs=-Xmx1536m
19
19
# org.gradle.parallel=true
20
20
21
21
# 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