Gradle itself provides SLF4J, so you shouldn't have your own dependency on it as it won't be used anyway.
And yes, that means SLF4J 1.x for now.
a
Andrea Di Menna
10/16/2023, 2:05 PM
ok I see. The problem is that I am relying on a dependency myself which uses SLF4J 2.x methods already 😞 I am getting
java.lang.NoSuchMethodError
at runtime
t
Thomas Broyer
10/16/2023, 2:11 PM
Depending on what you need to do, try to externalize it in a worker so you can have classloader isolation (and resolve those dependencies by creating a configuration in the project and declaring those dependencies there at runtime, rather than having them as dependencies of your plugin; like how Gradle's own Checkstyle, PMD, etc. work for instance)
a
Andrea Di Menna
10/16/2023, 2:14 PM
thanks @Thomas Broyer! That is very interesting, I will think about using this approach