hi community, how does the grails-cli.yml works? I...
# questions
g
hi community, how does the grails-cli.yml works? I recently found that grails 6 could not recognize the gradle tasks, I wonder if that because I did not configure the grails-cli.yml correctly, any related document for that file?
m
The grails-cli.yml file is for the new CLI to know the features used in a project (https://stackoverflow.com/questions/72800374/whats-micronaut-cli-yml-for). It has to my knowledge no effect on Gradle.
g
Thanks a lot @mattias_reichel. If I wan to run the extra tasks say, dbm-xxxxx, should I modify the grails-cli.yml?
m
In Grails 6, the Database Migration commands are available as Gradle tasks. For example:
./gradlew dbmGenerateChangelog -Pargs="test.groovy"
g
got it
Thanks
j
I added this code to my shell:
function _grails() {
local msg="$*";
`local gradleArgs=`print -l $msg`;`
gradle runCommand "-Pargs=$gradleArgs"
}
so you can then run _grails dbm-gorm-diff test.groovy
💡 1
g
Thanks @jdaugherty