 <p>Just found out one can get at it using either</p> <ul> <li><code>getProject().getGradle().getGradleVersion()</code><br> <a href="https://docs.gradle.org/current/javadoc/" rel="nofollow">Javadoc</a> and <a href="https://docs.gradle.org/current/dsl/org.gradle.api.invocation.Gradle.html#org.gradle.api.invocation.Gradle" rel="nofollow">DSL reference</a> for the Gradle core type which contains the version. Accordinng to the javadoc getVersion will never return null.</li> </ul> <p>or</p> <ul> <li><code>Plugin.class.getPackage().getImplementationVersion()</code><br> This is plain groovy/java <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html" rel="nofollow">class-based</a> and depends on the classloader and provided Manifest.</li> </ul>