Archinamon / android-gradle-aspectj

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

Compatibility with ButterKnife #6

Closed Archinamon closed 8 years ago

Archinamon commented 8 years ago

Needs to remove wrong generated files destination (now puts them into the project's root) and setup properly dest-dir.

Archinamon commented 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.

renaudcerrato commented 8 years ago

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.

renaudcerrato commented 8 years ago

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?

Archinamon commented 8 years ago

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!

renaudcerrato commented 8 years ago

FYI, no more issues using Butterknife 8