grails/grails-gradle-plugin — pull request #82 by jdpgrailsdev (2014-03-15 17:45:02+00:00)
Title: Fixed issue with command line args, environment and debug flag not being passed to tasks.

There is a known issue with the grails-gradle-plugin not setting the "grailsArgs", "grailsEnv" or "grailsDebug" properties on the actual Gradle tasks due to a chicken-and-egg problem between the calls to create/findByName on the tasks and the timing of when the existing rule gets applied. I have re-worked the configurator to ensure that the properties are properly added to the dynamically created tasks. In doing so, I have removed the rule, as it is unnecessary and causes all kinds of issues with dynamically created tasks at runtime. I have verified that all unit tests/integration tests continue to pass after this refactor and verified that the "grailsArgs" and "grailsEnv" properties are now making it through to the tasks by running with the modified plugin on an existing Grails application.

For reference, here are the issues that this should resolve:

* https://github.com/grails/grails-gradle-plugin/issues/81
* https://github.com/grails/grails-gradle-plugin/issues/79
* https://github.com/grails/grails-gradle-plugin/issues/53
* https://github.com/grails/grails-gradle-plugin/issues/20