-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
72 lines (60 loc) · 2.27 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
buildscript {
ext.versions = [
targetSdk: 27,
supportLibrary: '27.1.1',
retrofit: '2.4.0',
okHttp: '3.10.0',
// Fixtures
requestMatcher: '2.2.0',
// Test local
junit: '4.12',
hamcrest: '1.3',
robolectric: '3.8',
// Test instrumented
espresso: '3.0.1',
supportRunner: '1.0.1'
]
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.7.2'
}
}
allprojects {
repositories {
jcenter()
google()
}
configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& details.requested.name != 'multidex'
&& details.requested.name != 'multidex-instrumentation') {
details.useVersion versions.supportLibrary
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
void includeTestDeps(dependencies) {
// Local test deps
dependencies.testImplementation "junit:junit:$versions.junit"
dependencies.testImplementation "org.robolectric:robolectric:$versions.robolectric"
dependencies.testImplementation "org.hamcrest:hamcrest-all:$versions.hamcrest"
dependencies.testImplementation "br.com.concretesolutions:requestmatcher:$versions.requestMatcher"
// Instrumented tests deps
dependencies.androidTestImplementation "com.android.support:support-annotations:$versions.support"
dependencies.androidTestImplementation "com.android.support.test.espresso:espresso-core:$versions.espresso"
dependencies.androidTestImplementation "com.android.support.test:runner:$versions.supportRunner"
dependencies.androidTestImplementation "br.com.concretesolutions:requestmatcher:$versions.requestMatcher"
dependencies.androidTestImplementation "com.squareup.okhttp3:mockwebserver:$versions.okHttp"
}