Closed Archinamon closed 8 years ago
Temporarily solution to use ButterKnife with AspectJ-Gradle plugin is to use snapshot version of ButterKnife plugin. To upgrade project to use snapshot simple add a Sonotype repo:
repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } }
And change dependencies to use standalone preprocessor compiler:
dependencies { compile 'com.jakewharton:butterknife:8.0.0-SNAPSHOT' apt 'com.jakewharton:butterknife-compiler:8.0.0-SNAPSHOT' }
Notice, that you should use apt plugin to enable snapshot.
Hey! Thanks, that's what I ended up to do - but ButterKnife 8 isn't production-ready yet (no ButterKnife.destroy()
yet for example), so I'll wait a little bit before using Aspect-J/your plugin in production.
Thanks for everything, I will keep you updated for sure.
Hi Edgar!
I've some news for you: I discovered that gradle plugin for Dagger2 which uses AspectJ under the hood and which is fully working on my project (using ButterKnife 7!). That's very strange, isn't it?
Any clue?
Hello!
Interesting behavior. Think dagger2metrics works fine due to using aspectj-annotation syntax, not native. But that's only my thoughts. I'll look closely how it'll "friend" with native aspectj syntax, maybe on this week or on holidays :)
Thank's for your reply!
FYI, no more issues using Butterknife 8
Needs to remove wrong generated files destination (now puts them into the project's root) and setup properly dest-dir.