/
build.gradle
79 lines (67 loc) · 3.06 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
// 使用这种统一的依赖定义,IDE 会主动提示版本升级,如果放在 config.gradle IDE 就不会主动提示版本升级
ext {
ext.compileSdkVersion = 27
ext.minSdkVersion = 19
ext.targetSdkVersion = 27
ext.versionCode = 1
ext.versionName = "1.0.0"
ext.supportLibrary = "27.1.1"
applicationId = [
"app" : "com.xpf.android_components_framework",
"module1" : "com.xpf.module1",
"module2" : "com.xpf.module2",
"main_module": "com.xpf.mainmodule",
]
// Version
supportLibrary = "27.1.1"
dependencies = [
"junit" : 'junit:junit:4.12',
"test_runner" : "com.android.support.test:runner:1.0.2",
"test_espresso" : "com.android.support.test.espresso:espresso-core:3.0.2",
"multidex" : "com.android.support:multidex:1.0.1",
"constraint_layout" : "com.android.support.constraint:constraint-layout:1.1.3",
"recyclerview" : "com.android.support:recyclerview-v7:${supportLibrary}",
"suppoutDesign" : "com.android.support:design:${supportLibrary}",
"cardview" : "com.android.support:cardview-v7:${supportLibrary}",
"appcompat_v7" : "com.android.support:appcompat-v7:${supportLibrary}",
"arouter_compiler" : "com.alibaba:arouter-compiler:1.2.2",
"logger" : "com.orhanobut:logger:2.2.0",
"butterknife" : "com.jakewharton:butterknife:8.4.0",
"butterknife_compiler": "com.jakewharton:butterknife-compiler:8.4.0",
"glide" : "com.github.bumptech.glide:glide:4.8.0"
]
ext.multidex = '1.0.2'
ext.arouterApiVersion = '1.2.4'
ext.arouterCompilerVersion = '1.1.4'
ext.constraintLayoutVersion = '1.1.1'
ext.butterknifeVersion = '8.4.0'
ext.glideVersion = '4.5.0'
ext.retrofitVersion = '2.3.0'
}
repositories {
google()
jcenter()
}
dependencies {
// 这里只能用 3.0.1 版本,高版本和 butterknife 插件有冲突,在单独 module 运行时会找不到 R2 文件
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' // 路由需要
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0' // 添加 ButterKnife 插件的引用
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://clojars.org/repo/" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}