Android AOP aspectj 配置
沪江插件gradle_plugin_android_aspectjx: https://github.com/HujiangTechnology/gradle_plugin_android_aspectjx
以点击防重为例
project module
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.0'
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.8'
}
}
app module
参考:https://github.com/HujiangTechnology/gradle_plugin_android_aspectjx/issues/96
apply plugin: 'android-aspectjx'
aspectjx {
//include 'cn.appblog.common.utils.click.SingleClickAspect'
// fix Didn't find class "com.umeng.message.provider.MessageProvider" on path: DexPathList
exclude 'com.umeng.message'
}
需要点击防重的module
apply plugin: 'android-aspectjx'
common module (即声明SingleClickAspect的module)
dependencies {
api "org.aspectj:aspectjrt:1.9.4"
}
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/18/android-aop-aspectj-configuration/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
Android AOP aspectj 配置
沪江插件gradle_plugin_android_aspectjx: https://github.com/HujiangTechnology/gradle_plugin_android_aspectjx
以点击防重为例
project module
buildscri……
文章目录
关闭
共有 0 条评论