Plugin: Get the Classloader for the compiled classes

Hello Guys,
I’m developing a transpiler plugin and thus need to access all compiled .class files.
I tried using project.buildscript.classLoader, but that seems to be the ClassLoader used by the build script only (i.e. containing the Plugin etc).

Now another plugin is solving it like this:

I would hope to find a more clean solution and also: Would this even pick up the dependencies I specified? It uses getCompileClassPath(), but runtime classes won’t be available, right?

Thanks in Advance :slight_smile:

1 Like