HTTPBuilder or other libs in plugins

Hi,

I’m creating a plugin and have been doing HTTP calls for some time with the plain old Java HTTPUrlConnection. I can see that gradle distribution ships in its lib folder with HTTPBuilder but I haven’t been able to use it successfully in the past. Plugin compiles but ‘no class def found exception’ in runtime. Is there a way to make the libraries available in gradle’s distribution lib folder to the plugins?

Thanks

Those classes are explicitly shielded from plugins because they can change at any time without notice. So the short answer is “no” in this case.

Hi Luke, whilst you note the ones in the distro are off limits. Does that also mean we can’t pull them into a plugin through the normal means?

You can pull them in as usual. There’s no limitation to what you add to your compile/runtime classpath for a plugin.

Thanks @bmuschko . How has Gradle managed to isolate these libs, but conflicts with logging still occur? See, Classpath hell - SoapUI and Gradle API logging conflicts

Is this a pattern you could apply to logging?