Archinamon / android-gradle-aspectj

gradle plug-in adding supports of AspectJ into Android project
Apache License 2.0
365 stars 58 forks source link

Poincut with jar file in module (aar) #94

Open darkboy1202 opened 5 years ago

darkboy1202 commented 5 years ago

I want to write log when user call public function (ex: void A() ) from .Jar library (A.jar) , this is library from network .So I build an .aar file (B.aar) with A.jar library and send B.aar to User. How can I pointcut with function of A.jar in module B.aar ? . I used both of execution and call but it is not work.

darkboy1202 commented 5 years ago

I can pointcut function in AAR, but I can not pointcut function in JAR ( JAR included in AAR). Can you help me?

joaoluizn commented 5 years ago

@darkboy1202 Hello Darkboy.

I'm not familiarized with '.AAR' files, but just correct me if I'm wrong, won't it be imported as a normal dependency like any other '.JAR' file from maven or a libs folder?

Could you provide with pointcut you wrote?.

If you are trying to get a specific method inside this jar, you need to create a pointcut using the package you are trying to obtain.

Archinamon commented 4 years ago

I can pointcut function in AAR, but I can not pointcut function in JAR ( JAR included in AAR). Can you help me?

You have to include name of this "JAR included in AAR" to include-filter within gradle configuration block of aspectj plugin. Please try this way.