-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
147 lines (121 loc) · 5.61 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.21"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// 使用Hilt需要配置的Gradle插件
//classpath 'com.google.dagger:hilt-android-gradle-plugin:2.28-alpha'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.1"//和navigation版本号一致
// NOTE: Do not place your application dependencies here; they belong
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
isDebug = false // 为true时,调试模式,组件可以单独运行。 如果是false,统一编译模式
navigation_version = '2.3.1'
android = [
compileSdkVersion: 30,
minSdkVersion : 21,
targetSdkVersion : 30,
buildToolsVersion: "30.0.3",
versionCode : 1,
versionName : "1.0"
]
applicationId = [
"app" : "com.kevin.mvxapp",
"main": "com.kevin.main"
]
//region 插件
def appPlugins = [
"application": 'com.android.application',
"kotlin" : 'kotlin-android',
"kapt" : 'kotlin-kapt',
"extensions" : 'kotlin-android-extensions',
"hilt" : 'dagger.hilt.android.plugin'
]
ext.appPlugins = appPlugins
def libPlugins = [
"library": 'com.android.library',
"kotlin" : 'kotlin-android',
"kapt" : 'kotlin-kapt',
"extensions" : 'kotlin-android-extensions',
"hilt" : 'dagger.hilt.android.plugin'
]
ext.libPlugins = libPlugins
//endregion
//region library
def library = [
"appcompat" : "androidx.appcompat:appcompat:1.1.0",
"material" : "com.google.android.material:material:1.1.0",
"constraintlayout": "androidx.constraintlayout:constraintlayout:1.1.3",
"startup" : "androidx.startup:startup-runtime:1.0.0-alpha01",
"libARouter" : "com.alibaba:arouter-api:1.5.1",
"libHilt" : "com.google.dagger:hilt-android:2.38.1",
"libOkHttp3" : "com.squareup.okhttp3:okhttp:3.14.+",
"libHttpLogging" : "com.squareup.okhttp3:logging-interceptor:3.14.+",
"libRetrofit2" : "com.squareup.retrofit2:retrofit:2.9.0",
"libRetrofit2Gson" : "com.squareup.retrofit2:converter-gson:2.9.0",
"libRetrofit2RxJava" : "com.squareup.retrofit2:adapter-rxjava2:2.9.0",
"libRxJavaAndroid" : "io.reactivex.rxjava2:rxandroid:2.0.2",
"libGlide" : "com.github.bumptech.glide:glide:4.11.0",
// "libGlideCompiler" : "com.github.bumptech.glide:compiler:4.11.0",
"libVolley" : "com.android.volley:volley:1.1.0",
"libXUtils" : "org.xutils:xutils:3.3.36",
"kotlin": "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version",
"coreKtx": 'androidx.core:core-ktx:$kotlin_version',
"navigationUi" :"androidx.navigation:navigation-ui:2.3.1",
"navigationUiKtx" :"androidx.navigation:navigation-ui-ktx:2.3.1",
"navigationFragment" :"androidx.navigation:navigation-fragment:2.3.1",
"navigationFragmentKtx" :"androidx.navigation:navigation-fragment-ktx:2.3.1",
"navigationRunTime": "androidx.navigation:navigation-runtime:2.3.1"
]
ext.library = library
def commonlib = [
"libARouter" : "com.alibaba:arouter-api:1.5.1",
"libHilt" : "com.google.dagger:hilt-android:2.38.1",
]
ext.commonlib = commonlib
def annotationProcessor=[
"libARouterCompiler" : "com.alibaba:arouter-compiler:1.5.1",
"libHiltCompiler" : "com.google.dagger:hilt-android-compiler:2.38.1",
"libGlideCompiler" : "com.github.bumptech.glide:compiler:4.11.0"
]
ext.annotationProcessor = annotationProcessor
//endregion
libOkHttp3 = "com.squareup.okhttp3:okhttp:3.14.+"
libHttpLogging = "com.squareup.okhttp3:logging-interceptor:3.14.+"
libRetrofit2 = "com.squareup.retrofit2:retrofit:2.9.0"
libRetrofit2Gson = "com.squareup.retrofit2:converter-gson:2.9.0"
libRetrofit2RxJava = "com.squareup.retrofit2:adapter-rxjava2:2.9.0"
libRxJavaAndroid = "io.reactivex.rxjava2:rxandroid:2.0.2"
libGlide = "com.github.bumptech.glide:glide:4.11.0"
libGlideCompiler = "com.github.bumptech.glide:compiler:4.11.0"
libVolley = "com.android.volley:volley:1.1.0"
libXUtils = "org.xutils:xutils:3.3.36"
kotlin= "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
coreKtx= 'androidx.core:core-ktx:$kotlin_version'
libARouter = "com.alibaba:arouter-api:1.5.1"
libARouterCompiler = "com.alibaba:arouter-compiler:1.5.1"
libHilt = "com.google.dagger:hilt-android:2.38.1"
libHiltCompiler = "com.google.dagger:hilt-android-compiler:2.38.1"
navigationUi ="androidx.navigation:navigation-ui:2.3.1"
navigationUiKtx ="androidx.navigation:navigation-ui-ktx:2.3.1"
navigationFragment ="androidx.navigation:navigation-fragment:2.3.1"
navigationFragmentKtx ="androidx.navigation:navigation-fragment-ktx:2.3.1"
navigationRunTime= "androidx.navigation:navigation-runtime:2.3.1"
}