Closed davidwong closed 6 years ago
Hi!
Plugin doesn't support java 8 usage within .aj
files, but should support it for java-annotation style. This works 'cause .class
inputs on transform stage should not be with 52 bytecode version (java8 signature). It would great to provide crash logs and gradle configs to allow me to reproduce this behavior :)
Hi, I didn't have java 8 code in the aspects, just in app code. But I think the issue may have been with Gradle (maybe caching?) or how the build process interacts with your plugin.
I was preparing a sample app for you to look that was reproducing the problem. I took out all the aspectj stuff and gradually added it back in, and it started working, with the same code as before.
I'm still having problems getting the plugin to work with a complex app, but I don't think it is related to java 8, so I'll close this issue for now. I'll let you know what I find.
Anyway for future reference here were the errors I was getting. It was the app:transformClassesWithDexBuilderForLiteDebug build stage that was causing the problem, running straight after app:transformClassesWithAspectjForLiteDebug. It almost looked like the dex was trying to run on classes that had bypassed the desugar stage.
Looks veeery interesting. And strange. Aj transformer didn't proceed the code just like if you describe aspectj-provides
plugin instead of aspectj-ext
. And then fails like your app doesn't support java8 but compiled into 52 bytecode. Waaat :)
Please, let me know if such behavior will reproduce again. It would to be a very mystery bug.
I have got version 3.2.0 of the plugin to work with Android Studio / Android gradle plugin 3.0 (thank you very much for that!). There was a build problem with one project that had some Java 8 code in it.
Just wanted to ask if your plugin is supposed to support Java 8 or not. If so I can upload some error logs. Some further info about the problem:
it doesn't occur when the Java 8 code is in a class that has a joinpoint, only when the Java 8 code is in another class that is not affected by aspectj
the build also doesn't have the problem is I set minSdkVersion to 26, although I haven't been able to test the app with this since I don't have an Oreo device yet