jmh-gradle-plugin
jmh-gradle-plugin copied to clipboard
Manifest of shaded jar lacks multi-release header
Describe the bug The manifest of the JMH jar containing the JMH runtime and the compiled benchmark classes lacks a Multi-Release header when one of the dependencies is a multi-release JAR. This makes the JMH jar no longer a multi-release JAR, thus disables the multi-release mechanism, thus breaking these dependencies.
To Reproduce Steps to reproduce the behavior:
- Add a dependency to a multi-release JAR. eg.
ch.randelshofer:fastdoubleparser:0.5.4
- Build the JMH jar.
- Look at the manifest of the JMH jar, eg.
unzip -q -c build/libs/${artifact}-${version}-jmh.jar META-INF/MANIFEST.MF
The manifest looks like this
Manifest-Version: 1.0
Main-Class: org.openjdk.jmh.Main
It lacks a multi-release entry
Multi-Release: true