-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
84 lines (78 loc) · 2.9 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
//镜像,解决部分库无法下载
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
//GreenDao3依赖
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
//路由框架
classpath 'com.chenenyu.router:gradle-plugin:1.2.6'
}
// 可选配置.
ext {
routerVersion = "1.2.6" // 指定特定的router版本
compilerVersion = "1.2.6" // 指定特定的router-compiler版本
}
ext {
// Sdk and tools
minSdkVersion = 16
targetSdkVersion = 29
compileSdkVersion = 29
buildToolsVersion = '28.0.3'
// App dependencies
supportVersion = '28.0.0'
guavaVersion = '18.0'
junitVersion = '4.12'
mockitoVersion = '1.10.19'
powerMockito = '1.6.2'
hamcrestVersion = '1.3'
runnerVersion = '0.5'
rulesVersion = '0.5'
espressoVersion = '2.2.2'
constraintLayoutVersion = '1.0.2'
mainGroup = [
Junit : "junit:junit:$junitVersion",
SupportV7 : "com.android.support:appcompat-v7:$supportVersion",
SupportV4 : "com.android.support:support-v4:$supportVersion",
SupportRecyclerviewV7: "com.android.support:recyclerview-v7:$supportVersion",
CardViewV7 : "com.android.support:cardview-v7:$supportVersion",
Design : "com.android.support:design:$supportVersion",
ConstraintLayout : "com.android.support.constraint:constraint-layout:$constraintLayoutVersion"
]
}
}
allprojects {
repositories {
jcenter()
//镜像,解决部分库无法下载
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url "https://jitpack.io" }
google()
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
}
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex')) {
details.useVersion "28.0.0"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}