Ideally, the third party plugin should load your class(es) via a different classloader (eg URLClassLoader) rather than using the buildscript classloader. Then, the third party plugin would allow the classloader jars/directories to be configured in Gradle’s configuration phase (eg via an extension object or by adding dependencies to a custom Configuration)
Which third party plugin are we talking about? Is it open source? Or something developed in house?