This message was deleted.
# community-support
s
This message was deleted.
1
m
Welcome to Gradle classloaders ! I'd recommend reading https://dev.to/autonomousapps/a-crash-course-in-classpaths-build-l08 if you haven't already. Overall, my understanding is that the classpath isn't shared but more that the root classloader comes before the subproject one. So it's still 2 different classpaths. Only conflict resolution doesn't happen as you would expect
👍 1
n
I see, so shouldn't the root project classpath dependencies override the subproject dependencies in the lockfiles (as they do in the resolution eventually)?
v
Not in the lockfile. There is no conflict resolution and no overriding of the version. The subproject buildscript class path has its own version. But the superproject class loader that contains the superproject class path is the parent class loader of the subproject class loader containing the subproject class path. And according to Java class loading rules, the parent class loader is asked for a class first and used if it has the class.
👍 1
n
Thanks for the helpful explanation!
👌 2