I've implemented jacoco to my project some times ago. The implementation is just like described here:
classpath "org.jacoco:org.jacoco.core:0.8.3"
and I have no problem on that. (Let's say this is project 1)
But the thing is whenever I'm exporting the project to .jar file. The second project (let's say project 2) that I use the .jar file gives that error on runtime:
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_8ff85ea/Offline;
at
I've tracked the error about the library but in reality I don't want to export anything related to jacoco in project 1, because it seems meaningless to me to have that inside the jar file.
How can I keep jacoco out of the jar file?