melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle
Apache License 2.0
659 stars 88 forks source link

Support `io.github.goooler.shadow` plugin #262

Closed snazy closed 5 months ago

snazy commented 6 months ago

The shadow-plugin (ID com.github.johnrengelman.shadow) is currently rather unmaintained (last change in March/April 2023 as of January 2024) and already has a bunch of issues, especially with newer Gradle versions (8.2+) and when the included classes are built for Java 21 or newer (class file version 65+). This is problematic when using Java 21 directly or including a recent version of jackson-core, which is a multi-release jar that contains Java 21 classes.

There is a fork of the shadow plugin (ID io.github.goooler.shadow) that works against newer Gradle versions and Java 21. That one however is not recognized by the jmh plugin, which only check against the "original" plugin ID.

This change adds support for the forked plugin, one line change in the production code, other changes are readme and tests.

snazy commented 5 months ago

rebased + fixed CI