jamesfredley commented on code in PR #15411: URL: https://github.com/apache/grails-core/pull/15411#discussion_r2835697322
########## grails-doc/src/en/guide/upgrading/upgrading60x.adoc: ########## @@ -371,6 +371,12 @@ Here's an example `gradle.properties` file: micronautPlatformVersion=4.9.2 ---- +Please note that, due to https://github.com/micronaut-projects/micronaut-spring/issues/769[this issue], Spring Boot DevTools does not work with the Micronaut integration. + +IMPORTANT: Do **not** manually add Micronaut annotation processors (such as `micronaut-inject-java`) to your `build.gradle`. The Grails Gradle Plugin automatically configures the correct annotation processor for Java source files and uses Groovy AST transforms (`micronaut-inject-groovy`) for Groovy source files. Manually adding annotation processors may cause duplicate bean definitions or incremental compilation issues (see https://github.com/apache/grails-core/issues/15211[#15211]). Review Comment: Rewrote in 6b59b6f per @jdaugherty's feedback - now clarifies that the Micronaut plugin only adds Groovy support, annotation processors need to be configured separately for Java, and recommends splitting Java from Groovy in separate source sets to avoid breaking incremental compilation. ########## grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy: ########## @@ -376,10 +379,13 @@ class GrailsGradlePlugin extends GroovyPlugin { } } - project.logger.info('Adding Micronaut annotationProcessor dependencies to project {}', project.name) - project.getDependencies().add('annotationProcessor', project.dependencies.platform("io.micronaut.platform:micronaut-platform:$micronautPlatformVersion")) - project.getDependencies().add('annotationProcessor', 'io.micronaut:micronaut-inject-java') - project.getDependencies().add('annotationProcessor', 'jakarta.annotation:jakarta.annotation-api') + project.logger.info('Configuring CLASSIC boot loader for Micronaut compatibility in {}', project.name) + project.tasks.withType(BootJar).configureEach { BootJar bootJar -> + bootJar.loaderImplementation.convention(LoaderImplementation.CLASSIC) + } + project.tasks.withType(BootWar).configureEach { BootWar bootWar -> + bootWar.loaderImplementation.convention(LoaderImplementation.CLASSIC) + } Review Comment: Already applied in a prior commit (6c81244). -- 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]
