Build.gradle - Configure Eclipse so that System.getenv('PATH') returns the same value as from command line in macOS

I have found a workaround for this, it works on macOS (I guess that Windows did not had the original problem)

If I simply start Eclipse from a command line with:
/Applications/Eclipse.app/Contents/MacOS/eclipse

Or from finder with:
Applications->
Eclipse->
Right click->
Show Package Contents->
MacOS->
double click on Eclipse

Then I get the same environment variable in Buildship as I have from Gradle command line