forked from moneymanagerex/android-money-manager-ex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
254 lines (233 loc) · 9.33 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
/*
* Copyright (C) 2012-2016 The Android Money Manager Ex Project Team
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
classpath 'com.google.gms:google-services:1.3.1'
}
}
allprojects {
repositories {
jcenter()
// MPChartAndroid,
maven { url "https://jitpack.io" }
}
// Force all dependent libs to use the same version of the support annotations.
// This is used in testing libraries (Espresso).
// https://code.google.com/p/android-test-kit/issues/detail?id=136
configurations.all {
resolutionStrategy {
force 'org.hamcrest:hamcrest-core:1.3'
force 'junit:junit:4.12'
force 'org.apache.httpcomponents:httpcore:4.4.1'
force 'com.android.support:support-annotations:23.1.1'
}
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.money.manager.ex"
multiDexEnabled true
minSdkVersion 15
targetSdkVersion 23
versionCode 754
versionName '2016.01.10'
// 601 = 1.4.17, stable
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
// java.srcDirs = ['src']
java.srcDirs = ['src/main/java']
resources.srcDirs = ['src/main/java']
aidl.srcDirs = ['src/main/java']
renderscript.srcDirs = ['src/main/java']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
//jniLibs.srcDirs = ['libs']
}
// Unit tests
robolectric {
java.srcDir file('src/test/java/')
resources.srcDir file('src/test/resources')
}
// UI Tests
androidTest {
java.srcDirs = ['src/androidTest/java']
}
// Move the tests to tests/java, tests/res, etc...
// instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
buildTypes {
release {
minifyEnabled false
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
applicationVariants.all { variant ->
variant.outputs.each { output ->
def version = "-" + defaultConfig.versionName.replace(".", "_") + "_r" + defaultConfig.versionCode
output.outputFile = new File(output.outputFile.parent, output.outputFile.name.replace(".apk", version + ".apk"))
}
}
}
}
dataBinding {
enabled = true
}
// adding this currently breaks the build because of analytics dependencies?
productFlavors {
// beta {
// applicationId "com.money.manager.ex.beta"
// versionName "latestBeta"
// }
// stable {
// applicationId "com.money.manager.ex"
// }
}
lintOptions {
// if true, stop the gradle build if errors are found
abortOnError false
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES'
}
testOptions {
unitTests.returnDefaultValues = true;
}
}
dependencies {
compile(
fileTree(include: '*.jar', dir: 'libs'),
// androidSVG
project(':androidSVG_12'),
// 'com.caverock:androidsvg:1.2.1',
// 'com.caverock:androidsvg:1.2.2-beta-1',
'com.google.android.apps.dashclock:dashclock-api:2.0.0',
// Dropbox
'com.googlecode.json-simple:json-simple:1.1.1',
// Google
'com.android.support:appcompat-v7:23.1.1',
'com.android.support:support-v4:23.1.1',
'com.android.support:cardview-v7:23.1.1',
'com.android.support:support-annotations:23.1.1',
// support: floating action button, snackbar.
'com.android.support:design:23.1.1',
// 'org.bouncycastle:bcprov-jdk16:1.46'
// 'com.nispok:snackbar:2.10.10',
'com.opencsv:opencsv:3.5',
'net.objecthunter:exp4j:0.4.5',
'com.github.gabrielemariotti.changeloglib:changelog:2.0.0',
'org.apache.commons:commons-lang3:3.4',
'com.afollestad.material-dialogs:core:0.8.5.1@aar',
'com.melnykov:floatingactionbutton:1.3.0',
'com.github.pedrovgs:lynx:1.5',
'com.astuetz:pagerslidingtabstrip:1.0.1',
'de.hdodenhof:circleimageview:2.0.0',
// Page indicator on tutorial. https://android-arsenal.com/details/1/1268
'me.relex:circleindicator:1.1.7@aar',
'com.shamanland:fonticon:0.1.8',
// Ref: https://developer.android.com/tools/building/multidex.html
//'com.android.support:multidex:1.0.1',
// solution for #391
'com.github.flavienlaurent.datetimepicker:library:0.0.2',
'com.github.PhilJay:MPAndroidChart:v2.1.5',
// google play services
'com.google.android.gms:play-services-analytics:8.1.0',
// JavaMoney
// 'javax.money:money-api-bp:1.0',
// 'org.javamoney:moneta-bp:1.0',
// compile 'com.github.mikvor:money-conversion:1.0-SNAPSHOT'
// Retrofit turns your HTTP API into a Java interface.
'com.google.code.gson:gson:2.5',
'com.squareup.retrofit:retrofit:2.0.0-beta3',
'com.squareup.retrofit:converter-gson:2.0.0-beta2',
// 'com.innahema:collections-query:0.2.9'
// encryption
// 'net.zetetic:android-database-sqlcipher:3.3.1-2'
'de.greenrobot:eventbus:2.4.0',
'com.darwinsys:hirondelle-date4j:1.5.1'
)
// Robolectric, unit testing
testCompile(
'junit:junit:4.12',
'org.robolectric:robolectric:3.0',
// testCompile('org.robolectric:robolectric:3.0') {
// exclude group: 'commons-logging', module: 'commons-logging'
// exclude group: 'org.apache.httpcomponents', module: 'httpclient'
// }
'org.robolectric:shadows-support-v4:3.0',
'org.robolectric:shadows-multidex:3.0',
'org.robolectric:shadows-httpclient:3.0',
'com.squareup.assertj:assertj-android:1.1.0',
// Matchers
'org.hamcrest:hamcrest-core:1.3',
'org.hamcrest:hamcrest-library:1.3',
'org.hamcrest:hamcrest-integration:1.3',
// async handling
// 'com.jayway.awaitility:awaitility:1.6.4',
// mock/stub
// "org.mockito:mockito-core:1.+"
)
// // UI testing
androidTestCompile(
'com.android.support.test:runner:0.4',
// Set this dependency to use JUnit 4 rules
'com.android.support.test:rules:0.4',
// Set this dependency to build and run Espresso tests
'com.android.support.test.espresso:espresso-core:2.2.1',
'com.android.support.test.espresso:espresso-contrib:2.2.1',
// add this for intent mocking support
// 'com.android.support.test.espresso:espresso-intents:2.2'
// add this for webview testing support
// 'com.android.support.test.espresso:espresso-web:2.2'
// Matchers
'org.hamcrest:hamcrest-core:1.3',
'org.hamcrest:hamcrest-library:1.3',
'com.squareup.assertj:assertj-android:1.1.0',
// Robotium, UI testing
'com.jayway.android.robotium:robotium-solo:5.4.1',
// JBehave
// 'org.jbehave:jbehave-core:4.0.4'
)
// // Set this dependency to build and run UI Automator tests
// androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
compile 'com.android.support:support-v4:23.1.1'
}
configurations {
androidTestCompile.exclude group: 'com.android.support', module: 'support-v4'
}