uPhyca / gradle-android-aspectj-plugin

A Gradle plugin which enables AspectJ for Android builds.
Apache License 2.0
279 stars 55 forks source link

Error messages not clickable when using the plugin #26

Closed yan-braslavsky closed 8 years ago

yan-braslavsky commented 9 years ago

I am using this plugin for AspectJ support in my android project.

When I am making syntax errors , such as missing semicolon , I expect to see clickable error in messages log after I try to build the project. Something like this :

...\designlibdemo\MainActivity.java Error:(89, 63) error: ';' expected When I click on the error line , it takes me to the class and the line where the error is occurred.

But now when I am using aspectJ plugin , I only see the error description , which is actually not clickable , and I cannot follow the error to the code. Looks like this :

Error:Execution failed for task ':app:compileProductionDebugAspectj'. Syntax error, insert ";" to >complete BlockStatements

Does anyone know how to make it clickable , so it will take me to the error line ?

Opened a question on Stack Overflow

sampengilly commented 9 years ago

+1 for this.

It appears to be due to the AspectJ compilation task happening before the Java compilation task. As such it notices the error first and throws it's own exception which I believe is different from the exception thrown by the Java compilation task. The IntelliJ platform seems like it reads metadata out of specific parts of the Gradle output in order to generate clickable messages. Obviously it doesn't parse those errors out of the exception that this plugin throws.