Pass System properties and environment properties to grails commands

How can I pass system properties and environment properties to grails commands? When I run gradlew grails-run-app, I need to pass some project specific environment variables and some system properties view -D option.

How can I set these in the gradle.properties. I tried ORG_GRADLE_PROJECT_propName and org.gradle.project.PropName. Both of them don’t seem to work.

Can someone post a sample gradle.properties file that shows how to pass environment and system variables?

Thanks Anand

1 Like