-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathversions.gradle
120 lines (104 loc) · 4.15 KB
/
versions.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
ext.deps = [:]
def versions = [:]
/*
* Copyright 2018 Bakumon. https://github.com/Bakumon
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// gradle_plugin
versions.gradle_plugin = "3.0.1"
// gradle_plugin
versions.AndResGuard_gradle_plugin = "1.2.13"
// test
versions.junit = "4.12"
versions.test_runner = "1.0.1"
versions.espresso = "3.0.1"
// 支持库
versions.support = "27.0.2"
// ViewModel and LiveData
versions.lifecycle = "1.0.0"
// Room
versions.room = "1.0.0"
// rxjava2
versions.rxjava2 = "2.1.3"
versions.rxandroid = "2.0.1"
// BaseRecyclerViewAdapterHelper
versions.BRVAH = "2.9.34"
versions.floo = "1.1.0"
versions.datetimepicker = "3.5.1"
versions.MPChart = "v3.0.3"
versions.leakcanary = "1.5.4"
versions.permission = "1.2.0"
versions.storage = "2.1.0"
versions.prettytime = "4.0.1.Final"
versions.circleimageview = "2.2.0"
def deps = [:]
deps.gradle_plugin = "com.android.tools.build:gradle:$versions.gradle_plugin"
deps.AndResGuard_gradle_plugin = "com.tencent.mm:AndResGuard-gradle-plugin:$versions.AndResGuard_gradle_plugin"
deps.junit = "junit:junit:$versions.junit"
deps.test_runner = "com.android.support.test:runner:$versions.test_runner"
deps.spresso_core = "com.android.support.test.espresso:espresso-core:$versions.espresso"
def support = [:]
support.app_compat = "com.android.support:appcompat-v7:$versions.support"
support.design = "com.android.support:design:$versions.support"
support.customtabs = "com.android.support:customtabs:$versions.support"
deps.support = support
def lifecycle = [:]
lifecycle.extensions = "android.arch.lifecycle:extensions:$versions.lifecycle"
lifecycle.compiler = "android.arch.lifecycle:compiler:$versions.lifecycle"
deps.lifecycle = lifecycle
def room = [:]
room.runtime = "android.arch.persistence.room:runtime:$versions.room"
room.rxjava2 = "android.arch.persistence.room:rxjava2:$versions.room"
room.compiler = "android.arch.persistence.room:compiler:$versions.room"
deps.room = room
deps.rxjava = "io.reactivex.rxjava2:rxjava:$versions.rxjava2"
deps.rxandroid = "io.reactivex.rxjava2:rxandroid:$versions.rxandroid"
deps.BRVAH = "com.github.CymChad:BaseRecyclerViewAdapterHelper:$versions.BRVAH"
deps.floo = "me.drakeet.floo:floo:$versions.floo"
deps.datetimepicker = "com.wdullaer:materialdatetimepicker:$versions.datetimepicker"
deps.MPChart = "com.github.PhilJay:MPAndroidChart:$versions.MPChart"
deps.leakcanary_debug = "com.squareup.leakcanary:leakcanary-android:$versions.leakcanary"
deps.leakcanary_release = "com.squareup.leakcanary:leakcanary-android-no-op:$versions.leakcanary"
deps.permission = "pub.devrel:easypermissions:$versions.permission"
deps.storage = "com.snatik:storage:$versions.storage"
deps.prettytime = "org.ocpsoft.prettytime:prettytime:$versions.prettytime"
deps.circleimageview = "de.hdodenhof:circleimageview:$versions.circleimageview"
ext.deps = deps
def build_versions = [:]
build_versions.compile_sdk = 27
build_versions.min_sdk = 21
build_versions.target_sdk = 27
ext.build_versions = build_versions
def static addRepos(RepositoryHandler handler) {
handler.google()
handler.jcenter()
handler.maven {
url "https://jitpack.io"
}
}
ext.addRepos = this.&addRepos
def static uniformSupportVersion(ConfigurationContainer configurations) {
// 统一支持库使用 27.0.2 版本
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.0.2'
}
}
}
}
}
ext.uniformSupportVersion = this.&uniformSupportVersion