diff --git a/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/AllClassCompleter.groovy b/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/AllClassCompleter.groovy index 89a64472f1..158be6060a 100644 --- a/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/AllClassCompleter.groovy +++ b/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/AllClassCompleter.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2014-2022 the original author or authors. + * Copyright 2014-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,13 +26,9 @@ import grails.util.BuildSettings class AllClassCompleter extends ClassNameCompleter { AllClassCompleter() { - super( - new File(BuildSettings.BASE_DIR, 'grails-app').exists() - ? new File(BuildSettings.BASE_DIR, 'grails-app').listFiles()?.findAll { - File f -> f.isDirectory() && !f.isHidden() && !f.name.startsWith('.') } as File[] - : new File(BuildSettings.BASE_DIR, 'app').listFiles()?.findAll { - File f -> f.isDirectory() && !f.isHidden() && !f.name.startsWith('.') } as File[] - ) + super(BuildSettings.GRAILS_APP_DIR?.listFiles()?.findAll { + File f -> f.isDirectory() && !f.isHidden() && !f.name.startsWith('.') + } as File[]) } } diff --git a/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/DomainClassCompleter.groovy b/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/DomainClassCompleter.groovy index 51a6d88589..07de2c5250 100644 --- a/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/DomainClassCompleter.groovy +++ b/grails-shell/src/main/groovy/org/grails/cli/interactive/completers/DomainClassCompleter.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2014-2022 the original author or authors. + * Copyright 2014-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,9 +32,7 @@ import org.grails.io.support.Resource class DomainClassCompleter extends ClassNameCompleter { DomainClassCompleter() { - super(new File(BuildSettings.BASE_DIR, 'grails-app').exists() - ? new File(BuildSettings.BASE_DIR, 'grails-app/domain') - : new File(BuildSettings.BASE_DIR, 'app/domain')) + super(new File(BuildSettings.GRAILS_APP_DIR, 'domain')) } @Override