forked from parse-community/Parse-SDK-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (83 loc) · 2.4 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
apply plugin: "com.android.library"
apply plugin: "maven-publish"
apply plugin: "io.freefair.android-javadoc-jar"
apply plugin: "io.freefair.android-sources-jar"
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
consumerProguardFiles "release-proguard.pro"
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
lintOptions {
abortOnError false
}
buildTypes {
debug {
testCoverageEnabled = true
buildConfigField("String","PARSE_VERSION","\"${version}\"")
}
release {
minifyEnabled false
testCoverageEnabled = false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
buildConfigField("String","PARSE_VERSION","\"${version}\"")
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
ext {
okhttpVersion = "4.10.0"
}
dependencies {
api "androidx.annotation:annotation:1.4.0"
api "androidx.core:core:1.8.0"
api "com.squareup.okhttp3:okhttp:$okhttpVersion"
api project(':bolts-tasks')
testImplementation "org.junit.jupiter:junit-jupiter:$rootProject.ext.jupiterVersion"
testImplementation "org.skyscreamer:jsonassert:1.5.0"
testImplementation "junit:junit:$rootProject.ext.junitVersion"
testImplementation "org.mockito:mockito-core:$rootProject.ext.mockitoCoreVersion"
testImplementation "org.robolectric:robolectric:$rootProject.ext.robolectricVersion"
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttpVersion"
}
//region Publishing
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
}
}
}
}
//endregion
//region Code Coverage
apply plugin: "com.dicedmelon.gradle.jacoco-android"
jacoco {
toolVersion = "0.8.7"
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
testLogging {
events "failed"
}
}
tasks.withType(Test) {
useJUnitPlatform()
}
jacocoAndroidUnitTestReport {
csv.enabled false
html.enabled true
xml.enabled true
}
//endregion