| Using and Building AspectJ with Android App on Eclipse and Ant [message #762349]
||Wed, 07 December 2011 23:23
Registered: December 2011
Location: San Jose, CA
I'm new to this forum and just sign up today because I need some advices on what's the best approach on integrating AspectJ into my application.
I had asked same question yesterday in Stackoverflow, but I think I can probably get a much better answer here.
I'm new to Android and wanted to use AspectJ with it. I had searched couple articles online and follow the instruction to have it working: hxxp://blog.punegtug.org/2010/11/adding-aspect-to-android.html
But I wanted to know whether if it's possible to separate the aspects away from the Android project. In the tutorial link above, it has both the Android App and the aspects inside the same project, but in many cases, we wanted to leave the Android Project untouched in its isolating spaces.
Let said I have AndroidProject in my Eclipse workspace, I would like to create a separate projects for my aspects called something like "AndroidAspectProject" which only contains the aspects for it.
I'm not sure whether this would work because it seems we need to let AspectJ compiler inject point cuts and advices to the .class files before creating the .dex files. In this sense, I may not able to do it in a separate project.
Ideally, I want to separate it because I can put my AspectJ pointcuts and other stuff into somewhat a library project, so I can choose to only use it when I like it.
Does anyone try with this?
Another related question would be: Is it possible to have Ant build the AndroidProject with AND without aspects on it? Can this be done outside of Eclipse?
I'm looking for a way to build different flavours as I'm only injecting pointcuts into the AndroidProject on dev/debug build, but will leave it untouched on release build.
Thanks in advanced for any answers for this!
Powered by FUDForum
. Page generated in 0.01780 seconds