Archinamon / android-gradle-aspectj

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

Aspect update only does not result in weave #35

Open wjwarren opened 7 years ago

wjwarren commented 7 years ago

Hi,

Thanks for the great plugin! I really like working with it.

I have a question though. When I only make some changes to an Aspect *.aj, then the changes don't get woven when I rebuild my app. The transformClassesWithAspectj* task doesn't get executed because it is marked UP-TO-DATE.

My guess would be that this is because the transformClassesWithAspectj* task has Java class files defined as an input. Since no Java source changed, no new Java class files were generated, as a result the transformClassesWithAspectj* task is marked UP-TO-DATE and skipped.

Is this correct? If so, what do you think is the fastest way to make sure the Aspect changes are applied? Running clean before each assembleDebug|Release run works, but makes the process quite slow.

Cheers,

Wijnand

Archinamon commented 7 years ago

Unfortunately I see no way to achieve this for now :( Error:Custom content types (com.archinamon.api.AspectJStreamComposer$ContentType) are not supported in transforms (aspectj) That's what I've got trying to make a custom input producer to announce .aj files for all transformers.

Archinamon commented 7 years ago

I've been released 2.3.1 with new two-step build mechanic, so you can try it out :) Notice that in this release changed compilation flow, so it may occur some illegal behaviours. Feel free to feedback!

Archinamon commented 7 years ago

Update! You may try out two-step compilation with 2.4.0 plugin version.

wjwarren commented 7 years ago

Hi,

Sorry for the super late reply, I'm afraid though it's not working yet.

When I only modify an Aspect in my project, I do see the "AspectJ sources compilation" output on the console, but not the output from "Augmentation with AspectJ transformer".

I'm using v 3.0.0 with weaveInfo true.

Cheers,

Wijnand

Archinamon commented 7 years ago

That seems we need reopen this. Thank's for your feedback!