forked from pppscn/SmsForwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x-library.gradle
66 lines (61 loc) · 2.8 KB
/
x-library.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
apply plugin: 'com.xuexiang.xrouter'
apply plugin: 'kotlin-kapt'
//apply plugin: 'android-aspectjx'
apply plugin: 'com.xuexiang.xaop'
//自动添加依赖
configurations.each { configuration ->
def dependencies = getProject().dependencies
if (configuration.name == "implementation") {
//为Project加入X-Library依赖
//XUI框架
configuration.dependencies.add(dependencies.create(deps.xlibrary.xui))
configuration.dependencies.add(dependencies.create(deps.androidx.appcompat))
configuration.dependencies.add(dependencies.create(deps.androidx.recyclerview))
configuration.dependencies.add(dependencies.create(deps.androidx.design))
configuration.dependencies.add(dependencies.create(deps.glide))
//XUtil工具类
configuration.dependencies.add(dependencies.create(deps.xlibrary.xutil_core))
configuration.dependencies.add(dependencies.create(deps.xlibrary.xutil_sub))
//XAOP切片
configuration.dependencies.add(dependencies.create(deps.xlibrary.xaop_runtime))
//XUpdate版本更新
configuration.dependencies.add(dependencies.create(deps.xlibrary.xupdate))
//XHttp2
configuration.dependencies.add(dependencies.create(deps.xlibrary.xhttp2))
configuration.dependencies.add(dependencies.create(deps.rxjava2))
configuration.dependencies.add(dependencies.create(deps.rxandroid))
configuration.dependencies.add(dependencies.create(deps.okhttp3))
configuration.dependencies.add(dependencies.create(deps.gson))
//XPage
configuration.dependencies.add(dependencies.create(deps.xlibrary.xpage_lib))
//页面路由
configuration.dependencies.add(dependencies.create(deps.xlibrary.xrouter_runtime))
}
if (configuration.name == "kapt") {
//XPage
configuration.dependencies.add(dependencies.create(deps.xlibrary.xpage_compiler))
//页面路由
configuration.dependencies.add(dependencies.create(deps.xlibrary.xrouter_compiler))
}
if (isNeedLeakcanary.toBoolean() && configuration.name == "debugImplementation") {
//内存泄漏监测leak
configuration.dependencies.add(dependencies.create(deps.leakcanary))
}
}
configurations.configureEach {
resolutionStrategy.force deps.okhttp3
//总是拉取最新的 build 版本
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
/*
aspectjx {
// 这里需要修改包名
include 'com.idormy.sms.forwarder'
// 排除所有package路径中包含`android.support`的class文件及库(jar文件)
exclude 'android.support'
// 移除kotlin相关,编译错误和提升速度
exclude 'kotlin.jvm', 'kotlin.internal'
exclude 'kotlinx.coroutines.internal', 'kotlinx.coroutines.android'
exclude '*.jar', '*.aar', '*.so'
}
*/