-
-
Notifications
You must be signed in to change notification settings - Fork 271
/
Copy pathbuild.gradle
99 lines (81 loc) · 2.22 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
apply plugin: 'com.android.library'
apply plugin: 'jacoco'
apply plugin: 'com.hiya.jacoco-android'
apply plugin: 'net.ltgt.errorprone'
apply plugin: 'net.ltgt.apt'
apply from: '../config/quality.gradle'
apply from: '../maven_push.gradle'
jacoco {
toolVersion = "0.8.4"
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
multiDexEnabled true
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
testCoverageEnabled true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/LICENSE.txt'
}
testOptions {
unitTests.all {
jacoco {
includeNoLocationClasses = true
}
systemProperty 'robolectric.dependency.repo.url', 'https://repo1.maven.org/maven2'
}
}
testOptions.unitTests.includeAndroidResources = true
jacocoAndroidUnitTestReport {
csv.enabled false
html.enabled true
xml.enabled true
}
dependencies {
api deps.rxjava2
api deps.rxandroid2
implementation deps.annotation
testImplementation project(path: ':library')
testImplementation deps.junit
testImplementation deps.truth
testImplementation deps.robolectric
testImplementation deps.mockitocore
annotationProcessor deps.nullaway
compileOnly deps.nopen
errorprone deps.errorprone
errorprone deps.nopenchecker
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
tasks.withType(JavaCompile) {
if (!name.toLowerCase().contains("test")) {
options.compilerArgs +=
["-Xep:NullAway:ERROR", "-XepOpt:NullAway:AnnotatedPackages=com.github.pwittchen.reactivenetwork"]
}
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
}