Skip to content

Commit

Permalink
Don't throw exception if grails-app folder does not exist. Fixes #226
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Oct 2, 2023
1 parent 6b5adfa commit 62ef394
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,12 @@ class GrailsGradlePlugin extends GroovyPlugin {
@CompileStatic
protected List<File> resolveGrailsSourceDirs(Project project) {
List<File> grailsSourceDirs = []
project.file("grails-app").eachDir { File subdir ->
if (isGrailsSourceDirectory(subdir)) {
grailsSourceDirs.add(subdir)
File grailsApp = project.file("grails-app")
if (grailsApp.exists()) {
grailsApp.eachDir { File subdir ->
if (isGrailsSourceDirectory(subdir)) {
grailsSourceDirs.add(subdir)
}
}
}
grailsSourceDirs.add(project.file("src/main/groovy"))
Expand Down

0 comments on commit 62ef394

Please sign in to comment.