Skip to content

Commit

Permalink
Grails Gradle Plugin: set systemProperty 'base.dir' when running comm…
Browse files Browse the repository at this point in the history
…and or script
  • Loading branch information
rainboyan committed May 22, 2023
1 parent 32796bf commit 732759c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ class GrailsGradlePlugin extends GroovyPlugin {
protected static final List<String> CORE_GORM_PLUGINS = ['hibernate4', 'hibernate5']

List<Class<Plugin>> basePluginClasses = [IntegrationTestGradlePlugin] as List<Class<Plugin>>
List<String> excludedGrailsAppSourceDirs = ['migrations', 'assets']
List<String> grailsAppResourceDirs = ['views', 'i18n', 'conf']
List<String> excludedGrailsAppSourceDirs = ['assets', 'migrations', 'scripts']
List<String> grailsAppResourceDirs = ['conf', 'i18n', 'views']
private final ToolingModelBuilderRegistry registry
String grailsAppDir
String grailsVersion
Expand Down Expand Up @@ -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 'base.dir', project.projectDir
systemProperty "spring.devtools.restart.enabled", false
if (project.hasProperty('args')) {
args(CommandLineParser.translateCommandline(project.args))
Expand All @@ -659,6 +660,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 'base.dir', project.projectDir
systemProperty "spring.devtools.restart.enabled", false
if (project.hasProperty('args')) {
args(CommandLineParser.translateCommandline(project.args))
Expand Down

0 comments on commit 732759c

Please sign in to comment.