Which plugin API version should I use?

I am new to Gradle plugins, just starting my second one. I wonder how can I figure out which plugin API version should I target in my plugin? - i.e. which is the newest plugin API version that guarantees me to cover say 85% of gradle users?

To put it differently: In the Maven world, I kinda know that Maven 3.3.1+ and Java 7 is quite a safe bet. So which Gradle version would be the counterpart of Maven 3.3.1?

Are there any statistics available, where I could look and decide myself?

Unless you have to use specific stuff in Grafle 4’s API, I would say a minimum of Gradle 3.0.

Some of the Gradle golks might always want the later versions, but there are still people out there who has to use Gradle 3.x, so it is worth catering for them. I wish the Gradle stats werepublic as it would help to make more informed decisions.

As to JDK, I still build everything to be 7 compatible for as long as Gradle supports it as a minimum version. Obviously if you rely on a library that needs minimum of 8, you will have no choice but to use that as your minimum.

BTW if you use the GradleTest plugin, you can build your plugin with a later version of Gradle, but check that it us compatible with older versions.