-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.gradle
More file actions
134 lines (119 loc) · 6.99 KB
/
Copy pathconfig.gradle
File metadata and controls
134 lines (119 loc) · 6.99 KB
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
ext {
android = [
applicationId : "com.huangxiaoliang.mvparchdemo",
compileSdkVersion: 30,
buildToolsVersion: "30.0.3",
minSdkVersion : 19,
targetSdkVersion : 30,
versionCode : 3,
versionName : "1.0.8"
]
def signMap = getSignConfig()
// 打包签名配置
signConfig = [
keyAlias : signMap.keyAlias,
keyPassword : signMap.keyPassword,
storeFile : signMap.storeFile,
storePassword: signMap.storePassword
]
// 第三方库管理
dependencies = [
"junit" : 'junit:junit:4.12',
"ext-junit" : 'androidx.test.ext:junit:1.1.2',
"espresso-core" : 'androidx.test.espresso:espresso-core:3.3.0',
// google 官方支持库
appcompatV7 : 'androidx.appcompat:appcompat:1.3.1',
supportV4 : 'androidx.legacy:legacy-support-v4:1.0.0',
design : 'com.google.android.material:material:1.4.0',
recyclerview : 'androidx.recyclerview:recyclerview:1.1.0',
cardview : 'androidx.cardview:cardview:1.0.0',
constraintLayout : 'androidx.constraintlayout:constraintlayout:2.0.4',
multidex : 'androidx.multidex:multidex:2.0.1',
// --- UI相关
butterknife : "com.jakewharton:butterknife:10.2.1",
butterknifeCompile : "com.jakewharton:butterknife-compiler:10.2.1",
baseRecyclerViewAdapterHelper: "com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4",
ShadowLayout : 'com.github.lihangleo2:ShadowLayout:3.2.0',
//样式非常多的loading动画效果
aviDialog : 'com.wang.avi:library:2.1.3',
kprogresshud : 'com.kaopiz:kprogresshud:1.2.0',
//刷新控件,不用可去掉
refreshHorizontal : 'com.scwang.smart:refresh-layout-horizontal:2.0.0',
refreshKernel : 'com.scwang.smart:refresh-layout-kernel:2.0.1',
refreshHeaderClassics : 'com.scwang.smart:refresh-header-classics:2.0.1',//经典刷新头
refreshHeaderMaterial : 'com.scwang.smart:refresh-header-material:2.0.1',//谷歌刷新头
// --- 沉浸式状态栏
statusbarutil : 'com.jaeger.statusbarutil:library:1.5.1',
statusBarCompat : 'com.githang:status-bar-compat:0.7',
// --- 图片相关
glide : "com.github.bumptech.glide:glide:4.11.0",
glideCompiler : 'com.github.bumptech.glide:compiler:4.11.0',
luban : "top.zibin:Luban:1.1.8",
photoView : "com.github.chrisbanes:PhotoView:2.1.0",
subsamplingScaleImageView : "com.davemorrissey.labs:subsampling-scale-image-view:3.10.0",
// --- 网络相关
okhttp : "com.squareup.okhttp3:okhttp:3.8.1",
OKGO : 'com.lzy.net:okgo:3.0.4',
//okhttp的下载上传监听
progressmanager : "me.jessyan:progressmanager:1.5.0",
// --- 数据相关
fastjson : "com.alibaba:fastjson:1.2.72",
greendao : "org.greenrobot:greendao:3.2.2",
// --- 检测内存泄漏
ReleaseLeakCanary : 'com.squareup.leakcanary:leakcanary-android-no-op:1.6',
DebugAndTestLeakCanary : 'com.squareup.leakcanary:leakcanary-android-no-op:1.6',
//DebugAndTestLeakCanary : 'com.squareup.leakcanary:leakcanary-android:1.6',
// --- Logger
Logger : 'com.orhanobut:logger:2.2.0',
// --- 省去了写shape文件
FlycoRoundView_Lib : 'com.flyco.roundview:FlycoRoundView_Lib:1.1.4@aar',
// --- 发粘性事件 而且修复ottoBUS的问题
EventBus : 'org.greenrobot:eventbus:3.2.0',
MultiType : 'me.drakeet.multitype:multitype:3.5.0',
rxbinding : 'com.jakewharton.rxbinding2:rxbinding:2.2.0',
//xposed root 虚拟机检测
easyProtector : 'com.lahm.library:easy-protector-release:1.1.2',
PickerView : 'com.contrarywind:Android-PickerView:4.1.9',
//banner https://github.com/youth5201314/banner
banner : 'com.youth.banner:banner:2.1.0',
utilcode : 'com.blankj:utilcodex:1.30.6',
PictureSelector : 'com.github.LuckSiege.PictureSelector:picture_library:v2.6.0',
//轮子哥的TitleBar
TitleBar : 'com.github.getActivity:TitleBar:8.6',
//titleBar、加载视图的框架
loadingstateview : 'com.github.DylanCaiCoding.LoadingStateView:loadingstateview:4.0.1',
ViewBindingKTX : 'com.github.DylanCaiCoding.ViewBindingKTX:viewbinding-base:2.1.0',
KotlinJdk8 : 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31',
XRecyclerViewDivider : 'com.github.HHotHeart:XRecyclerViewDivider:1.0.1',
//让RxJava变得有生命周期感知,使得其能及时取消订阅,避免出现内存泄漏问题。(rxjava、rxAndroid)
rxlifecycle : 'com.trello.rxlifecycle4:rxlifecycle-components:4.0.2',
//appcompat版本1.3.1未包含,高版本不用引入
lifecycleJava8 : "androidx.lifecycle:lifecycle-common-java8:2.4.0"
]
}
/**
* 获取签名信息
* @return 返回Map
*/
def getSignConfig() {
Properties properties = new Properties()
InputStream inputStream = project.rootProject.file('local.properties').newDataInputStream();
properties.load(inputStream)
def keyAlias, keyPassword, storeFile, storePassword
keyAlias = properties.getProperty('keyAlias')
keyPassword = properties.getProperty('keyPassword')
storeFile = properties.getProperty('storeFile')
storePassword = properties.getProperty('storePassword')
// 提示用户
if (keyAlias == null || keyPassword == null || storeFile == null || storePassword == null) {
def ANSI_RED = "\u001B[31m", ANSI_RESET = "\u001B[0m"
println "${ANSI_RED}please set sign-info in local.properties${ANSI_RESET}"
}
def map = ["keyAlias": "", "keyPassword": "", "storeFile": "", "storePassword": ""]
map.keyAlias = keyAlias
map.keyPassword = keyPassword
map.storeFile = storeFile
map.storePassword = storePassword
println(map.toString())
return map
}