Be able to specify required Gradle version for a plugin

Would be nice to have a way of specifying required Gradle version in a plugin. Or is this possible already?

Hope this isn’t too silly, but I use

assert gradle.gradleVersion == ‘1.0-milestone-7’

in my build script.

Aha…so you have the gradle version available there…thanks!

Maybe I need to implement a little more logic in a plugin, so it works from m7 and up and not just on the specific version.

Would be nice if Gradle followed the Semantic Versioning scheme or something similar

(Consider a version format of X.Y.Z (Major.Minor.Patch). Bug fixes not affecting the API increment the patch version, backwards compatible API additions/changes increment the minor version, and backwards incompatible API changes increment the major version.)

Could not agree more!

Maybe they could use this java library . It can even be run against 2 versions of a jar file to check which version the newest should have, based on changes in the public API.

There are a handful of things that need to happen to make plugin development more practical with Gradle, this being one of them.

This is covered by this umbrella roadmap item .