From cedad3c3de7e28e004af86ec1c405d3837cb450e Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Wed, 10 May 2023 11:45:05 +0800 Subject: [PATCH] Grails Gradle Plugin: Fixes run-command fails Also a workaround is to add the following to build.gradle: ``` runCommand { systemProperty "spring.devtools.restart.enabled", false } ``` --- .../org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy b/grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy index dc15e9c69d..3e4e95cade 100644 --- a/grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy +++ b/grails-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy @@ -645,6 +645,7 @@ class GrailsGradlePlugin extends GroovyPlugin { project.tasks.create('runScript', ApplicationContextScriptTask) { classpath = project.sourceSets.main.runtimeClasspath + project.configurations.console + project.configurations.profile systemProperty Environment.KEY, System.getProperty(Environment.KEY, Environment.DEVELOPMENT.getName()) + systemProperty "spring.devtools.restart.enabled", false if (project.hasProperty('args')) { args(CommandLineParser.translateCommandline(project.args)) } @@ -658,6 +659,7 @@ class GrailsGradlePlugin extends GroovyPlugin { project.tasks.create('runCommand', ApplicationContextCommandTask) { classpath = project.sourceSets.main.runtimeClasspath + project.configurations.console + project.configurations.profile systemProperty Environment.KEY, System.getProperty(Environment.KEY, Environment.DEVELOPMENT.getName()) + systemProperty "spring.devtools.restart.enabled", false if (project.hasProperty('args')) { args(CommandLineParser.translateCommandline(project.args)) }