2022-06-06 08:56:20 +00:00
|
|
|
|
apply plugin: 'com.xuexiang.xrouter'
|
|
|
|
|
apply plugin: 'kotlin-kapt'
|
2022-09-21 08:10:55 +00:00
|
|
|
|
//apply plugin: 'android-aspectjx'
|
2022-06-06 08:56:20 +00:00
|
|
|
|
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))
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-12 03:30:21 +00:00
|
|
|
|
if (isNeedLeakcanary.toBoolean() && configuration.name == "debugImplementation") {
|
2022-06-06 08:56:20 +00:00
|
|
|
|
//内存泄漏监测leak
|
|
|
|
|
configuration.dependencies.add(dependencies.create(deps.leakcanary))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-17 12:04:18 +00:00
|
|
|
|
configurations.configureEach {
|
2022-06-06 08:56:20 +00:00
|
|
|
|
resolutionStrategy.force deps.okhttp3
|
2022-07-01 09:43:19 +00:00
|
|
|
|
//总是拉取最新的 build 版本
|
|
|
|
|
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
2022-06-06 08:56:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-03-22 04:58:47 +00:00
|
|
|
|
/*
|
|
|
|
|
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'
|
|
|
|
|
}
|
|
|
|
|
*/
|