-P Parameters and Environment Variables

I’m running Buildship on Eclipse Mars
I’ve not been able to get a -P parameter passed to the Runtime Configuration or get it to pick up an environment variable.
Its not intuitive how to configure those - I tried various settings through the (x)=arguments panel but it doesn’t recognise -P or when using a variable it thinks its a task.
Could you please provide some examples in the documentation?
Many thanks

Passing a runtime parameter with a -P runtime argument works for me. I followed the steps below:

  1. create a sample project containing a simple build.gradle containing a sample task:

    task printVar() << {
    println Var

  2. open the “Import Gradle Project” wizard, specified the sample project folder and hit next

  3. on the “Import Options” page set gradle version to 2.4 and the Program arguments to -PVar=Default

  4. click next to see the project preview and then click finish to import the project

The imported project should have the runtime argument stored in the .settings/gradle.prefs file.

If you execute the printVar task from the task view it will print the runtime argument. This runtime argument will be added to all build execution by default.

If you want to specify a runtime argument to one specific execution you can use the corresponding “Arguments” run configuration page.

When executed the changes are visible.

Once we have a documentation we’ll definitely add this item too. Also, please let us know if the steps above doesn’twork for you.