Ibotta / gradle-aspectj-pipeline-plugin

A Gradle plugin for Android projects which performs AspectJ weaving using Android's bytcode manipulation pipeline.
Apache License 2.0
75 stars 15 forks source link

Support for aspectj native syntax (aj files) #7

Closed davidwong closed 3 years ago

davidwong commented 3 years ago

Hi, just wanted to verify if this plugin supports aspects written in native syntax (rather than aspectj annotations). I tried to add an aj file to one of the samples but couldn't get it to work. I'm assuming that this is because the plugin is hooking into the "bytecode manipulation pipeline" rather than during compilation so that the aj files never get compiled. Does this mean that the plugin can never be used for aspectj native syntax files, or is it possible but is just not something you guys use for your projects.

eschlenz commented 3 years ago

Hey @davidwong,

We do not use .aj files for our projects, and unfortunately for your case, this plugin was developed without any consideration for that. It was mainly born out of our own needs, which we thought others might benefit from.

That's not to say the plugin could never support .aj files. It just doesn't at this time. Off the top of my head, I'm not sure what the level of effort would be to add that type of support. I could look into it. Or if you're interested in taking a stab and contributing back to the project, that's certainly an option as well.

davidwong commented 3 years ago

Thanks for the quick reply (and for open sourcing this plugin). I'll have a look to see if it can be done, although my aspectj is a bit rusty!