{"id":1287,"date":"2023-03-18T10:14:00","date_gmt":"2023-03-18T02:14:00","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1287"},"modified":"2023-04-29T09:20:03","modified_gmt":"2023-04-29T01:20:03","slug":"android-aop-aspectj-configuration","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/18\/android-aop-aspectj-configuration\/","title":{"rendered":"Android AOP aspectj \u914d\u7f6e"},"content":{"rendered":"<p>\u6caa\u6c5f\u63d2\u4ef6gradle_plugin_android_aspectjx: <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/github.com\/HujiangTechnology\/gradle_plugin_android_aspectjx\">https:\/\/github.com\/HujiangTechnology\/gradle_plugin_android_aspectjx<\/a><\/p>\n<p>\u4ee5\u70b9\u51fb\u9632\u91cd\u4e3a\u4f8b<\/p>\n<h2>project module<\/h2>\n<p><!-- more --><\/p>\n<pre><code>buildscript {\n    repositories {\n        google()\n        jcenter()\n        mavenCentral()\n    }\n    dependencies {\n        classpath &#039;com.android.tools.build:gradle:3.5.0&#039;\n        classpath &#039;com.jakewharton:butterknife-gradle-plugin:10.2.0&#039;\n        classpath &#039;com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.8&#039;\n    }\n}<\/code><\/pre>\n<h2>app module<\/h2>\n<p>\u53c2\u8003\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/github.com\/HujiangTechnology\/gradle_plugin_android_aspectjx\/issues\/96\">https:\/\/github.com\/HujiangTechnology\/gradle_plugin_android_aspectjx\/issues\/96<\/a><\/p>\n<pre><code>apply plugin: &#039;android-aspectjx&#039;\n\naspectjx {\n    \/\/include &#039;cn.appblog.common.utils.click.SingleClickAspect&#039;\n    \/\/ fix Didn&#039;t find class &quot;com.umeng.message.provider.MessageProvider&quot; on path: DexPathList\n    exclude &#039;com.umeng.message&#039;\n}<\/code><\/pre>\n<h2>\u9700\u8981\u70b9\u51fb\u9632\u91cd\u7684module<\/h2>\n<pre><code>apply plugin: &#039;android-aspectjx&#039;<\/code><\/pre>\n<h2>common module (\u5373\u58f0\u660eSingleClickAspect\u7684module)<\/h2>\n<pre><code>dependencies {\n    api &quot;org.aspectj:aspectjrt:1.9.4&quot;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6caa\u6c5f\u63d2\u4ef6gradle_plugin_android_aspectjx: https:\/\/github.com\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[202],"tags":[100],"class_list":["post-1287","post","type-post","status-publish","format-standard","hentry","category-android-build","tag-aop"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1287"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1287\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}