-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathbuild.gradle
109 lines (92 loc) · 4.14 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.2.0'
}
ext.buildConfig = [
'compileSdk': 27,
'targetSdk' : 27,
'minSdk' : 16,
'isSnapshot': false,
'version' : [
'major' : 1,
'minor' : 0,
'patch' : 0,
'classifier': null, // dev, beta, alpha etc.
]
]
ext.versions = [
'supportLibrary' : '27.1.1',
'constraintLayout': '1.1.0',
'firebase' : '15.0.0',
'testRunner' : '1.0.1',
'espressoCore' : '3.0.1',
'leak_canary' : '1.5.4',
'timber' : '4.7.0',
'play_services' : '15.0.0',
'picasso' : '2.5.0',
'retrofit' : '2.4.0',
'gson' : '2.8.4',
'gsonConvertor' : '2.3.0'
]
String versionName = "${buildConfig.version.major}.${buildConfig.version.minor}.${buildConfig.version.patch}"
ext.buildConfig.version['name'] = versionName
ext.buildConfig.version['code'] = buildConfig.version.major * 100000 + buildConfig.version.minor * 10000 + buildConfig.version.patch * 100
ext.deps = [
'android': [
'support': [
'appcompatV7' : "com.android.support:appcompat-v7:${versions.supportLibrary}",
'annotations' : "com.android.support:support-annotations:${versions.supportLibrary}",
'constraintLayout': "com.android.support.constraint:constraint-layout:${versions.constraintLayout}",
'design' : "com.android.support:design:${versions.supportLibrary}",
'cardView' : "com.android.support:cardview-v7:${versions.supportLibrary}",
'recycleView' : "com.android.support:recyclerview-v7:${versions.supportLibrary}",
'gson' : "com.google.code.gson:gson:${versions.gson}",
'test' : [
'runner' : "com.android.support.test:runner:${versions.testRunner}",
'espressoCore': "com.android.support.test.espresso:espresso-core:${versions.espressoCore}"
]
],
],
'google' : [
'firebase' : [
'auth': "com.google.firebase:firebase-auth:${versions.firebase}"
],
'play_services': [
'location': "com.google.android.gms:play-services-location:${versions.play_services}",
'maps' : "com.google.android.gms:play-services-maps:${versions.play_services}"
]
],
'other' : [
'timber' : "com.jakewharton.timber:timber:${versions.timber}",
'picasso' : "com.squareup.picasso:picasso:${versions.picasso}",
'gsonConvertor': "com.squareup.retrofit2:converter-gson:${versions.gsonConvertor}",
'api' : "com.squareup.retrofit2:retrofit:${versions.retrofit}"
],
'junit' : 'junit:junit:4.12'
]
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support') {
details.useVersion versions.supportLibrary
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}