From e7b90fba91806d78854ed57d309f7f7cc56a7b6a Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Sat, 8 Jun 2024 04:11:12 +0800 Subject: [PATCH] Fixes task `compileGroovy` execute failed on Windows --- .../org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy b/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy index 720cb6a813..e378380ed3 100644 --- a/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy +++ b/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/core/GrailsGradlePlugin.groovy @@ -674,6 +674,10 @@ class GrailsGradlePlugin extends GroovyPlugin { def projectType = getGrailsProjectType() def isPlugin = projectType == GrailsProjectType.PLUGIN def grailsAppDir = new File(project.projectDir, grailsAppDir).absolutePath + if (System.getProperty('os.name').startsWith('Windows')) { + projectDir = projectDir.replace('\\', '\\\\') + grailsAppDir = grailsAppDir.replace('\\', '\\\\') + } configScriptTask.inputs.property('name', projectName) configScriptTask.inputs.property('version', projectVersion) configScriptTask.doLast {