Get Gradle distribution type

I develop a plugin that run Gradle.
In my plugin I use GradleConnector to run a specific Gradle task which is relevant to my plugin.

I’m looking for a way to get the chosen Gradle distribution type from the Eclipse preferences: “Gradle wrapper”, “Local installation disrectory”, “Remove distribution location” or “Specific Gradle version”.
How can I do this?
Thanks!

If you do this by implementing a new projectconfigurator extension then you get a fully configured ProjectConnection. For more details check the documentation on the org.eclipse.buildship.core.ProjectConfigurator interface.