Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to execute Groovy scripts in a Grails environment with th… (
#10056) * Add ability to execute Groovy scripts in a Grails environment with the Gradle 'runScript' task. * Use Environment static properties * Cleanup
- Loading branch information
1 parent
dcfa7e1
commit 6e2849d
Showing
4 changed files
with
101 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...gin/src/main/groovy/org/grails/gradle/plugin/commands/ApplicationContextScriptTask.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.grails.gradle.plugin.commands | ||
|
||
import groovy.transform.CompileStatic | ||
import org.gradle.api.tasks.JavaExec | ||
|
||
@CompileStatic | ||
class ApplicationContextScriptTask extends JavaExec { | ||
|
||
ApplicationContextScriptTask() { | ||
setMain("grails.ui.script.GrailsApplicationScriptRunner") | ||
dependsOn("classes", "findMainClass") | ||
systemProperties(System.properties.findAll { it.key.toString().startsWith('grails.') } as Map<String, Object>) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters