diff --git a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java index 65f7f23769..84b0594263 100644 --- a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java +++ b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java @@ -258,14 +258,9 @@ protected PluginResolvingClassLoader(ClassLoader parent, ClassLoader classLoader */ public static Class wrap(ClassLoader parent, Class type) { try { - Class t = Class.forName(type.getName(), + return Class.forName(type.getName(), false, new PluginResolvingClassLoader(parent, type.getClassLoader(), type.getProtectionDomain())); - System.out.println("XXXXX"); - System.out.println(t.getClassLoader()); - System.out.println(Plugin.class.getClassLoader()); - System.out.println(parent); - return t; } catch (ClassNotFoundException exception) { throw new IllegalStateException("Failed to wrap plugin type " + type.getName(), exception); }