jdaugherty commented on code in PR #15411:
URL: https://github.com/apache/grails-core/pull/15411#discussion_r2828422796


##########
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy:
##########
@@ -376,10 +379,22 @@ class GrailsGradlePlugin extends GroovyPlugin {
                 }
             }
 
-            project.logger.info('Adding Micronaut annotationProcessor 
dependencies to project {}', project.name)
+            // Add Micronaut annotation processor for Java source files.
+            // Groovy sources are handled by micronaut-inject-groovy AST 
transforms (via compileOnlyApi),
+            // but Java sources require the Java annotation processor to 
generate BeanDefinition classes.
+            // The annotationProcessor configuration only affects compileJava 
tasks, not compileGroovy.
+            project.logger.info('Adding Micronaut annotationProcessor for Java 
sources in {}', project.name)

Review Comment:
   The annotation processors are incompatible with groovy incremental 
compilation and have previously never been configured.  I'd argue we shouldn't 
configure them and document it so that if someone wants it for java, they can 
have it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to