在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
gradle_plugin_android_aspectjx一个在Android中应用Aspectj的Gradle插件。支持切AAR, JAR, 支持现在Android上最火的Kotlin。 开发该项目的原因是基于还没有发现目前的开源库中比较好的AOP框架或者工具,虽然xposed,dexposed非常强大,但由于Android的碎片化比较严重,兼容问题永远是一座无法逾越的大山。而且发现的AspectJ相关插件都不支持AAR或者JAR切入的,对于目前在Android圈很火爆的Kotlin更加无能为力。 该项目的设计参考了大神JakeWharton的Hugo项目及uPhyca的gradle-android-aspectj-plugin项目的设计思想,并在它们的基础上扩展支持AAR, JAR及Kotlin的应用。在此感谢JakeWharton和uPhyca.[跪拜] 使用
dependencies { classpath 'com.hujiang.gradle.plugin.android:aspectjx:1.0.0' }
dependencies { classpath fileTree(dir:'plugins', include:['*.jar']) }
apply plugin: 'android-aspectjx'//或者这样也可以apply plugin: 'com.hujiang.android-aspectjx' 到此为止,gradle_plugin_android_aspectjx的接入就完成了,但是要AspectJ发挥作用还需要你自己写切片代码,可以参考AspectJ Demo 不了解AspectJ的请自行了解,参考: AspectJ Development Environment Guide Contactemail:[email protected] QQ:541136835 微信:13386016339 LicenseCopyright 2016 hujiang, Inc.Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.gradle_plugin_android_aspectjx |
请发表评论