From 869e5e40f9713070bae4d8a0c61d2a219528b6ff Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Thu, 21 Jan 2021 01:10:37 +0530 Subject: [PATCH] Update GrailsGradlePlugin to add micronaut-inject-groovy with developmentOnly scope instead of runtimeOnly. Fixes grails/gorm-hibernate5#253 --- .../org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy b/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy index 93281534..b287b4f1 100644 --- a/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy +++ b/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy @@ -455,7 +455,9 @@ class GrailsGradlePlugin extends GroovyPlugin { agent } final String micronautVersion = project.properties['micronautVersion'] - project.dependencies.add("runtimeOnly", "io.micronaut:micronaut-inject-groovy:${micronautVersion?:defaultMicronautVersion}") + if (project.configurations.findByName("developmentOnly")) { + project.dependencies.add("developmentOnly", "io.micronaut:micronaut-inject-groovy:${micronautVersion?:defaultMicronautVersion}") + } project.afterEvaluate(new AgentTasksEnhancer()) } }