@@ -4,7 +4,8 @@ apply plugin: "io.freefair.android-javadoc-jar"
4
4
apply plugin : " io.freefair.android-sources-jar"
5
5
6
6
android {
7
- compileSdkVersion rootProject. ext. compileSdkVersion
7
+ namespace ' com.parse'
8
+ compileSdk rootProject. ext. compileSdkVersion
8
9
9
10
defaultConfig {
10
11
minSdkVersion rootProject. ext. minSdkVersion
@@ -15,6 +16,18 @@ android {
15
16
testOptions {
16
17
unitTests {
17
18
includeAndroidResources = true
19
+
20
+ all {
21
+ // Configure JaCoCo options
22
+ jacoco {
23
+ includeNoLocationClasses = true
24
+ excludes. add(" jdk.internal.*" )
25
+ }
26
+ // Configure test logging
27
+ testLogging {
28
+ events(" failed" )
29
+ }
30
+ }
18
31
}
19
32
}
20
33
@@ -25,20 +38,24 @@ android {
25
38
buildTypes {
26
39
debug {
27
40
testCoverageEnabled = true
28
- buildConfigField(" String" ," PARSE_VERSION" ," \" ${ version} \" " )
41
+ buildConfigField(" String" , " PARSE_VERSION" , " \" ${ version} \" " )
29
42
}
30
43
release {
31
44
minifyEnabled false
32
45
testCoverageEnabled = false
33
46
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
34
- buildConfigField(" String" ," PARSE_VERSION" ," \" ${ version} \" " )
47
+ buildConfigField(" String" , " PARSE_VERSION" , " \" ${ version} \" " )
35
48
}
36
49
}
37
50
38
51
compileOptions {
39
52
sourceCompatibility JavaVersion . VERSION_1_8
40
53
targetCompatibility JavaVersion . VERSION_1_8
41
54
}
55
+
56
+ buildFeatures {
57
+ buildConfig true
58
+ }
42
59
}
43
60
44
61
ext {
@@ -65,38 +82,23 @@ afterEvaluate {
65
82
publishing {
66
83
publications {
67
84
release(MavenPublication ) {
68
- from components. release
85
+ from components. findByName( ' release' )
69
86
}
70
87
}
71
88
}
72
89
}
73
90
74
91
// endregion
75
92
76
- // region Code Coverage
77
-
78
- apply plugin : " com.dicedmelon.gradle.jacoco-android"
79
-
80
- jacoco {
81
- toolVersion = rootProject. ext. jacocoVersion
82
- }
83
-
84
- tasks. withType(Test ) {
85
- jacoco. includeNoLocationClasses = true
86
- jacoco. excludes = [' jdk.internal.*' ]
87
- testLogging {
88
- events " failed"
93
+ tasks. withType(JacocoReport ). configureEach {
94
+ jacoco. toolVersion = rootProject. ext. jacocoVersion
95
+ reports {
96
+ csv. required. set(false )
97
+ html. required. set(true )
98
+ xml. required. set(true )
89
99
}
90
100
}
91
101
92
- tasks. withType(Test ) {
102
+ tasks. withType(Test ). configureEach {
93
103
useJUnitPlatform()
94
104
}
95
-
96
- jacocoAndroidUnitTestReport {
97
- csv. enabled false
98
- html. enabled true
99
- xml. enabled true
100
- }
101
-
102
- // endregion
0 commit comments