Skip to content

Commit 2960324

Browse files
authored
Merge pull request #15069 from jdaugherty/7.0.x
2 parents 73ff4ab + 51fb909 commit 2960324

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsExtension.groovy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ class GrailsExtension {
6767
*/
6868
boolean springDependencyManagement = true
6969

70+
/**
71+
* Whether the Micronaut `annotationProcessor` dependencies should be auto-added to the project
72+
* on detection of the `grails-micronaut` plugin, and the version defined by the `micronautPlatformVersion`
73+
* Gradle property is enforced.
74+
*/
75+
boolean micronautAutoSetup = true
76+
7077
/**
7178
* Configure the reloading agent
7279
*/

grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,12 @@ class GrailsGradlePlugin extends GroovyPlugin {
390390
if (!micronautEnabled) {
391391
return
392392
}
393+
394+
GrailsExtension ge = project.extensions.getByType(GrailsExtension)
395+
if (!ge.micronautAutoSetup) {
396+
return
397+
}
398+
393399
project.logger.lifecycle('Micronaut Support Detected for {}', project.name)
394400

395401
final String micronautPlatformVersion = project.properties['micronautPlatformVersion']

0 commit comments

Comments
 (0)