Skip to content

Commit 5669839

Browse files
committed
#14777 - fix groovy files being included on profile compiler
1 parent 0f7c1f1 commit 5669839

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/profiles/tasks/ProfileCompilerTask.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ class ProfileCompilerTask extends AbstractCompile {
151151
profileData.put('extends', dependencies.join(','))
152152
}
153153

154-
List<File> groovySourceFiles = (commandsDirectory.getOrNull()?.files()?.findAll { File f ->
154+
List<File> groovySourceFiles = (commandsDirectory.getOrNull()?.asFileTree?.findAll { File f ->
155155
f.name.endsWith('.groovy')
156156
} ?: []) as List<File>
157-
List<File> ymlSourceFiles = (commandsDirectory.getOrNull()?.files()?.findAll { File f ->
157+
List<File> ymlSourceFiles = (commandsDirectory.getOrNull()?.asFileTree?.findAll { File f ->
158158
f.name.endsWith('.yml')
159159
} ?: []) as List<File>
160160

@@ -213,7 +213,7 @@ class ProfileCompilerTask extends AbstractCompile {
213213
if (groovySourceFiles) {
214214
CompilerConfiguration configuration = new CompilerConfiguration()
215215
configuration.setScriptBaseClass('org.grails.cli.profile.commands.script.GroovyScriptCommand')
216-
configuration.setTargetDirectory(destination.asFile)
216+
configuration.setTargetDirectory(destination.getAsFile())
217217
configuration.setClasspath(classpath.asPath)
218218

219219
def importCustomizer = new ImportCustomizer()

grails-profiles/base/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ ext {
3131

3232
dependencies {
3333
profileRuntimeApi platform(project(':grails-bom'))
34+
profileRuntimeApi project(':grails-shell-cli')
3435
profileRuntimeApi 'org.apache.groovy:groovy-jmx' // stop script uses GroovyMBean
3536
}
3637

0 commit comments

Comments
 (0)