forked from clover/clover-android-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.gradle
46 lines (39 loc) · 984 Bytes
/
common.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
apply from: file("${project.rootDir}/versions.gradle")
repositories {
mavenLocal()
google()
mavenCentral()
jcenter()
}
dependencies {
testImplementation "junit:junit:$JUNIT_VERSION"
testImplementation "org.mockito:mockito-core:$MOCKITO_VERSION"
testImplementation "org.robolectric:robolectric:$ROBOLECTRIC_VERSION"
}
configurations.compile.resolutionStrategy {
force "com.google.guava:guava:$GUAVA_VERSION"
force "org.hamcrest:hamcrest-core:$HAMCREST_VERSION"
}
android {
testOptions {
unitTests {
includeAndroidResources = true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
// Reduce tests when asked
gradle.taskGraph.useFilter { Task task ->
if (project.hasProperty('reduceTests')) {
if (task.name.contains("ReleaseSignedUnitTest")) {
return false
}
if (task.name.contains("ReleaseUnitTest")) {
return false
}
}
return true
}