uPhyca / gradle-android-aspectj-plugin

A Gradle plugin which enables AspectJ for Android builds.
Apache License 2.0
279 stars 55 forks source link

Proguard build failing when adding this plugin #50

Open digzou opened 7 years ago

digzou commented 7 years ago

Hi,

Before I start let me tell that I am aware that this plugin has been deprecated. Still, I'm hopeful that somebody is still using this plugin and might help in some way.

I have been using this plugin for sometime now. It has helped me, tremendously, build projects with AspectJ features. Until recent when one of my project build fails when I try to build with proguard enabled with errors of type :

Warning:com.xyz.ABC$6$1: can't find enclosing method 'void onConnectFailed()' in program class com.xyz.ABC$6 Warning:com.xyz.LMN$5$1: can't find referenced method 'android.app.Activity access$600(com.xyz.LMN)' in program class com.xyz.LMN

The problem is that these warnings are generated on my code. And only when I add this plugin.

-dontwarn com.xyz.** fixes the build failure issue, but I'm using these methods and I think they are getting stripped.

I tried updating the gradle version to 2.1.0 [Same version which my app is using] and aspectj lib to version 1.8.9. But the error still persists.

Any help will be greatly appreciated. Thanks in advance.