/
build.gradle
195 lines (162 loc) · 7.17 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply from: '../config/jenkins/jenkins.gradle'
apply from: '../config/quality/quality.gradle'
apply from: '../config/dependency/dependencies.gradle'
apply plugin: 'spoon'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.mercandalli.android.apps.files"
minSdkVersion 10
targetSdkVersion 25
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
// Enabling multidex support.
// Avoid the 64K Limit http://developer.android.com/tools/building/multidex.html#avoid
multiDexEnabled true
//testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "com.mercandalli.android.apps.files.FileSpaceJUnitRunner"
}
dexOptions {
// 4 Gigabytes is a maximum heap size for dex operation
// http://stackoverflow.com/questions/33750404/android-gradle-what-is-javamaxheapsize-4g
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true // shrinkResources does not yet work with useJack
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
versionNameSuffix ".dev"
}
}
sourceSets {
main {
// https://medium.com/google-developer-experts/android-project-structure-alternative-way-29ce766682f0#.sjnhetuhb
res.srcDirs = [
'src/main/res/admin',
'src/main/res/common',
'src/main/res/file',
'src/main/res/main',
'src/main/res/note',
'src/main/res/storage',
'src/main/res/support'
]
}
//Everything related to connected test live in src/androidTest/core/java
androidTest.java.srcDir 'src/androidTest/core/java'
//Instrumented unit tests live in src/androidTest/unit
androidTest.java.srcDir 'src/androidTest/unit/java'
//Instrumented integration tests live in src/androidTest/integration
androidTest.java.srcDir 'src/androidTest/integration/java'
//Instrumented use cases tests live in src/androidTest/usecases
androidTest.java.srcDir 'src/androidTest/usecases/java'
}
packagingOptions {
// uiAutomator : https://code.google.com/p/android/issues/detail?id=195331
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
compileOptions {
encoding "UTF-8"
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
spoon {
// Enable debug output
debug = true
// Disable gif
noAnimations = true
// Set custom test reports directory (defaults to "spoon")
baseOutputDir = file("$buildDir/spoon-custom-report-dir")
// Enable setting test class/method-to-be-run from command line. E.g.:
// $> ../gradlew spoonFreeDebugTest -PspoonClassName=com.stanfy.spoon.example.test.MainActivityTest -PspoonMethodName=testSetText
if (project.hasProperty('spoonClassName')) {
className = project.spoonClassName
if (project.hasProperty('spoonMethodName')) {
methodName = project.spoonMethodName
}
}
// You can pass instrumentation arguments. Tests in this example assert this pair is passed.
instrumentationArgs = ["foo=bar"]
// It's also possible to configure tests sharding using convenient properties:
// numShards = 2
// shardIndex = 0
adbTimeout = 30
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':shared')
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:palette-v7:25.1.0'
compile 'com.android.support:support-annotations:25.1.0'
compile 'com.android.support:mediarouter-v7:25.1.0'
compile 'com.google.android.gms:play-services-cast:10.0.1'
compile 'com.google.android.gms:play-services-analytics:10.0.1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.google.android.gms:play-services-wearable:10.0.1'
compile 'com.google.android.gms:play-services-identity:10.0.1'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile 'com.google.android.gms:play-services-plus:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.android.support:multidex:1.0.1'
// Network
compile('com.squareup.retrofit2:retrofit:2.0.2') {
// exclude Retrofit’s OkHttp peer-dependency module and define your own module import
exclude module: 'okhttp'
}
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.5'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
// Audio
// Try to remove 'org.jaudiotagger:jaudiotagger:2.0.1'
// compile 'org.jaudiotagger:jaudiotagger:2.0.1' // 4_810 methods
// View
compile 'com.romainpiel.shimmer:library:1.4.0@aar' // TextView
compile 'de.hdodenhof:circleimageview:2.0.0' // CircleImageView
compile 'com.squareup.picasso:picasso:2.5.2' // ImageView
compile 'com.github.bumptech.glide:glide:3.7.0' // ImageView
// Other
compile 'org.glassfish:javax.annotation:10.0-b28'
compile('com.crashlytics.sdk.android:crashlytics:2.5.6@aar') {
transitive = true;
}
// Mercandalli main library
compile rootProject.ext.dependencies.base
// Testing-only dependencies
androidTestCompile 'com.android.support:support-annotations:25.1.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.squareup.spoon:spoon-client:1.5.4'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.2'
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
wearApp project(':wearable')
}
apply plugin: 'com.google.gms.google-services'
// Count methods.
// https://github.com/KeepSafe/dexcount-gradle-plugin
// make sure this line comes *after* you apply the Android plugin
// apply plugin: 'com.getkeepsafe.dexcount'