gradle-plugins / toolbox

Painless and fast Gradle plugin development :rocket:
https://nokee.dev/docs/toolbox
Apache License 2.0
20 stars 3 forks source link

Provide better runtime message for incompatible environment #9

Open lacasseio opened 4 years ago

lacasseio commented 4 years ago

When we use a plugin inside an incompatible environment, i.e. older JVM, older Gradle, etc., it tends to produce cryptic error messages. Just like how Gradle has some code that runs on JDK 6 to provide a useful error message, the development plugins should shim a compatibility layer to show a helpful error message.

lacasseio commented 4 years ago

Shimming the plugin entry point works great except when the incompatibility is with the Gradle metadata. Either we warn against using it (which may not be a great idea) or warn when backward-incompatible data is used.

lacasseio commented 4 years ago

When fixing this, we should consider warning when a user configures a lower JVM compatibility version than the minimum JVM for the minimum Gradle version. They most likely want to achieve better error message and the plugins take care of that for them. If they want to support that version because of the targetted Gradle version, then they should adjust the minimumGradleVersion instead to properly communicate the intent.