It sounds like the
gradle install isn't complete and the gradle executable isn't on your $PATH. Sometimes with Windows you have to log out or restart for environment variable to take hold. Also note there are a couple other options on windows that'll help manage installing packages for you. Checkout
https://gradle.org/install/ for more details.
Did you know about the gradle-wrapper? When you create a new Grails app, it includes both a gradlew and grailsw script. Those scripts will download the appropriate versions and you can use them wherever you'd execute gradle or grails (respectively) from the terminal.
ApplicationCommand vs Script
A command is a Grails Gradle task and shell command that can be run with the grails command from a terminal window. Commands are backed by the
ApplicationCommand Trait and are meant to be runnable from the grails shell (or directly like
grails run-query). They are useful for plugins that require access to an instance of the GrailsApplication at runtime. For example the database migration plugin uses ApplicationCommands to handle the dbm-diff command. You can run those commands via gradle (
gradle dbmDiff) or via grails (
grails dbm-diff) and the Commands need access to the application.
A third option would be to write(or find/extend) a Gradle task to accomplish what you are looking for. There are a ton of gradle plugins out there that might line up with what you are looking for.
https://plugins.gradle.org/
It sounds like you are thinking the task you are migrating is beyond the scope of a script. Its hard to point you in the right direction without knowing too much about what you are trying to accomplish. What types of things did the old script accomplish?
Happy Trails,