-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.gradle
94 lines (86 loc) · 3.59 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
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
ext {
kotlin_version = "1.8.20"
}
apply from:'maven_publish.gradle' //依赖 maven 发布脚本
android {
compileSdkVersion 33
// The specified Android SDK Build Tools version (25.0.3) is ignored, as it is below the minimum
// supported version (26.0.2) for Android Gradle Plugin 3.0.1.
// Android SDK Build Tools 26.0.2 will be used.
// To suppress this warning, remove "buildToolsVersion '25.0.3'" from your build.gradle file,
// as each version of the Android Gradle Plugin now has a default version of the build tools.
defaultConfig {
// minSdkVersion 17//14-->17
minSdkVersion 19//17-->(19: Android 4.4)
// targetSdkVersion 29
targetSdkVersion 33 //Android 13
}
buildTypes {
release {
minifyEnabled true
consumerProguardFile 'proguard-rules.pro' //暂时不用吧
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace 'common.base'
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
kotlin {
// jvmToolchain(8)
jvmToolchain(17)
}
publishing {
singleVariant('release') {
//源码
withSourcesJar()
//java 文档: 会对各类生成 html文档
// withJavadocJar()
}
}
lintOptions {
abortOnError false
}
}
//repositories {
// flatDir {
// dirs 'libs'
// }
// google()
// mavenCentral()
//}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//This artifact and its classes are deprecated. Use LiveData or reactive streams instead.
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
testImplementation 'junit:junit:4.13.2'
api 'androidx.appcompat:appcompat:1.6.1'
api 'com.google.android.material:material:1.8.0'
api 'androidx.recyclerview:recyclerview:1.3.0'
api 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
api 'com.squareup.retrofit2:retrofit:2.9.0' // -> 2.9.0 (最新:2020-5月的)
api 'com.squareup.retrofit2:converter-jackson:2.9.0'
// Glide v4 need a minimum API level of 14.
// Glide v4 requires you to compile against API 26 or later
//建议使用implementation,这样的好处是编译速度会加快。如果需要提供外部访问的时候,使用api即可
//implementation 'com.github.bumptech.glide:glide:4.15.1'
api 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
implementation "com.github.bumptech.glide:okhttp3-integration:4.12.0"
api 'io.github.feer921:XSelector:1.2'//一个使用代码设置各控件的选中、点击、使能状态的库以减少drawalbe越来越多的xml文件
implementation "androidx.core:core-ktx:1.9.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.0' // kotlin coroutines 协程
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1"
// 2.6.1
api 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
api 'com.tencent:mmkv:1.3.0' //腾讯的 MMKV持久化框架,替换系统原生的 SP
}