-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.gradle
113 lines (87 loc) · 3.86 KB
/
common.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
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion COMPILE_SDK_VERSION as int
defaultConfig {
minSdkVersion MIN_SDK_VERSION as int
targetSdkVersion TARGET_SDK_VERSION as int
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
kapt {
arguments {
arg("AROUTER_MODULE_NAME", project.getName())
arg("room.schemaLocation", "$projectDir/schemas".toString())
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
dataBinding true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.6'
// Koin 依赖注入,也可替换成hilt注入
implementation "io.insert-koin:koin-android:3.3.3"
implementation 'com.google.android.material:material:1.8.0'
//kotlin
implementation 'androidx.core:core-ktx:1.8.0'
//协程
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
// implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
// implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
// implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.1"
//WorkManager
implementation "androidx.work:work-runtime-ktx:2.7.1"
implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper:4.0.0-beta04"
//下拉刷新,上拉加载
implementation 'io.github.scwang90:refresh-layout-kernel:2.0.5' //核心必须依赖
implementation 'io.github.scwang90:refresh-header-classics:2.0.5' //经典刷新头
implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
//图片加载框架
def coil_version = "2.2.2"
implementation "io.coil-kt:coil:$coil_version"
implementation "io.coil-kt:coil-gif:$coil_version"
implementation "io.coil-kt:coil-svg:$coil_version"
implementation "io.coil-kt:coil-video:$coil_version"
//圆形imageView,主要用于带边框,否则应用图片加载框架裁剪圆图
implementation 'de.hdodenhof:circleimageview:3.1.0'
//recyclerview item动画
implementation 'jp.wasabeef:recyclerview-animators:4.0.2'
//折叠布局滑动抖动解决方案
// implementation 'com.github.yuruiyin:AppbarLayoutBehavior:v1.0.3'
//retrofit2 http相关
implementation "com.squareup.retrofit2:retrofit:2.9.0"//包含Okttp库
implementation "com.squareup.retrofit2:converter-gson:2.9.0"//包含Gson库
implementation 'com.squareup.okhttp3:logging-interceptor:4.11.0'
//路由跳转(公共Module中添加基础依赖)
implementation 'com.alibaba:arouter-api:1.5.2'
//路由跳转(每个需要的Module中需分别添加处理器)
kapt 'com.alibaba:arouter-compiler:1.5.2'
def room_version = "2.4.3"
//room(公共Module中添加基础依赖)
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
//room(每个需要的Module中需分别添加处理器)
kapt "androidx.room:room-compiler:$room_version"
}