Failed to apply plugin 'com.microej.gradle.application'

Hello,

I’m currently testing the GitHub - MicroEJ/Example-Java-Widget at 8.1.0 example.

I updated the Gradle plug-in to 0.20.0 to test the latest features. I now have the following error when building my project:

An exception occurred applying plugin request [id: 'com.microej.gradle.application', version: '0.20.0']
> Failed to apply plugin 'com.microej.gradle.application'.
   > Invalid Gradle version. The MicroEJ plugin requires Gradle 8.6 or higher, whereas Gradle 8.3 is used.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 1s

How could I fix this issue?

Regards,

Fabrice

HI Fabrice,

As mentioned in the error message, you are currently using a version of Gradle that is not compatible with the version 0.20.0 of our plugins. (minimum is Gradle 8.6)
In our Migration Notes, we recommend to use the Gradle wrapper update mechanism: this will both update the version of Gradle fetched by the wrapper but potentially also the wrapper scripts, JAR & properties.

See Gradle user guide: Gradle Wrapper Reference (./gradlew wrapper --gradle-version latest).

Also, it is useful to update to the latest version of Gradle rather than to the minimum version we support.

Best regards,
Rémy