How to use JMH with gradle?
问题 I want to use JMH, an OpenJDK microbenchmark tool, with gradle . However, Im getting the NPE on compilation. On the other hand, JMH works when using from maven. I am not posting any build.gradle as it is basic - apply java plugin and add dependency on JHM tool ( org.openjdk.jmh:jmh-core:0.2 ). I have tried whats written here without success. What else I have to do? I think something with setting the agent, but I still didnt figure it out. Exception: :compileJava java.lang.NullPointerException