SmsForwarder/app/x-library.gradle

58 lines
2.4 KiB
Groovy
Raw Normal View History

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))
}
if (configuration.name == "debugImplementation") {
//内存泄漏监测leak
configuration.dependencies.add(dependencies.create(deps.leakcanary))
}
}
configurations.all {
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
}
// 这里需要修改包名
2022-09-21 08:10:55 +00:00
//aspectjx {
// include 'com.idormy.sms.forwarder'
//}