Not automatically selectable I think.
When Gradle resolves the plugin artifact it knows its own version.
But it neither knows which Kotlin plugin will be applied or will be on the class path or whether any Kotlin plugin will be applied at all actually.
If you want to support these Kotlin Gradle plugins and not define a minimum version for example by depending on it, I guess the best solution from a user perspective is the usual checking what is available and taking different code paths.
So you can have a class for 1.6, a class for 1.7, and a class for 1.8 and then in the main plugin class you check for something, for example whether
KotlinProjectExtension
is available and then use the compatible class, something like that.