This message was deleted.
# plugin-development
s
This message was deleted.
v
Yes, the rootproject class loader is the parent of the subproject class loader and thus the classes on it win. The question is, what nature is the dependency? Is it just a "do something if plugin 2 is applied too"? If so, you can probably make it provided. If plugin 1 needs to apply plugin 2 I guess there is not much you can do on the plugin side, because plugin 1 would not see the classes of plugin 2 in the subproject.
😒 1
t
We don't control plugin1
v
Ah I understood you ask how you "fix" it from plugin 1, which plugin did you mean then?
t
plugin2
v
I see, let me think about it
Hm, I have no real idea. I don't think there is much you can do about it from plugin2. Where you apply plugin1 and plugin2 you can add the newer plugin2 to the class path of the root build script. But from within plugin2 I don't think you can do anything, as the parent class loader will always win. Except for using a different plugin ID in the newer version maybe.
thank you 1
l
I agree with the above and to add to it, changing the plugin Id will not be enough. You effectively have to change the package of the classes in the plugin JAR, otherwise classloader shadowing will still apply.
👍 1