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


##########
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:
   Agreed. Removed the auto-configured annotation processors. Added a comment 
in the plugin noting the incompatibility with Groovy incremental compilation 
and pointing to the docs for manual setup.
   
   The micronaut test example now explicitly configures the annotationProcessor 
deps in its own build.gradle since it has Java sources 
(`JavaSingletonService.java`). All 33 integration tests pass.



-- 
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