/
build.gradle
105 lines (84 loc) · 3.72 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
103
104
105
apply plugin: 'com.android.application'
apply plugin: 'spoon'
android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "weatherview.joshskeen.com.weatherview"
minSdkVersion 21
targetSdkVersion 22
buildConfigField "String", "WEATHERVIEW_API_KEY", "\"840dbdf2737a7ff9\"";
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Enabling Multidex support for 'androidTest' builds because of large dependencies
multiDexEnabled = true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
debug {
buildConfigField "String", "IP", "\"127.0.0.1\""
buildConfigField "Integer", "PORT", "9998"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
packagingOptions {
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
}
dependencies {
//------ Compile Dependencies ------
implementation('com.squareup.retrofit2:retrofit:2.3.0') {
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.squareup.okhttp3:okhttp:3.8.0'
implementation "com.squareup.okhttp3:logging-interceptor:3.8.0"
implementation "org.slf4j:slf4j-api:1.7.12"
implementation 'com.google.dagger:dagger:2.8'
//------ Android Test Dependencies ------
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1') {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.guava', module: 'guava'
exclude group: 'junit', module: 'junit'
}
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'junit:junit:4.12'
//MockWebServer - Version 2.2 of mockwebserver doesn't work because of an issue, so forcing v2.1 - https://github.com/square/okhttp/issues/1069
androidTestImplementation('com.squareup.okhttp3:mockwebserver:3.8.0') {
exclude module: 'okhttp'
}
//WireMock
androidTestImplementation("com.github.tomakehurst:wiremock:2.8.0") {
//Using Android Version Instead
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
//Version conflict with our app's slf4j version
exclude group: 'org.slf4j', module: 'slf4j-api'
//Was getting a classpath conflict for org.objectweb.asm.AnnotationVisitor which is a part of 'net.minidev:asm'
exclude group: 'org.ow2.asm', module: 'asm'
//Was getting this warning, so decided to ignore this version included by WireMock.
//Warning:Dependency org.json:json:20090211 is ignored as it may be conflicting with the internal version provided by Android.
//In case of problem, please repackage with jarjar to change the class packages
exclude group: 'org.json', module: 'json'
}
androidTestImplementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
androidTestImplementation 'commons-io:commons-io:2.5'
androidTestImplementation "com.squareup.spoon:spoon-client:1.7.1"
androidTestImplementation 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'
}
configurations {
all*.exclude group: 'commons-logging', module: 'commons-logging'
all*.exclude group: 'com.android.support', module: 'support-annotations'
}
// This section is optional
spoon {
// for debug output
debug = true
codeCoverage = false
// To grant permissions to Android M >= devices (For screenshot storage)
grantAllPermissions = true
}