melix / jmh-gradle-plugin

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

jmhJar dependencies #117

Open noahtaylor opened 6 years ago

noahtaylor commented 6 years ago

is there a way to exclude dependencies directly like in shadowJar? shadowJar { dependencies { exclude(dependency('shadow:d:1.0')) } }

pdorrestijn commented 6 years ago

I have the same issue's. I can run the gradle jmh goal, however it seems impossible to create a runnable jar. shadowJar and jar gradle configurations are completely ignored. jmh runtime dependencies are not packaged in the runnable jar. classpath is not set in runnable jar main class entry points to org.openjdk.jmh.Main (which is not present in the jar, and if it would the classpath is not set thus it still doesn't work).

Is there a proper description on how to succesfully create a runnable jar?

keilhofer commented 2 years ago

I managed to exclude classes using

jmhJar {
    exclude('ch/qos/logback/**')
    exclude('org/slf4j/impl/**')
}