When AOT processing generates classes (CGLib proxies, for example) we currently configure those classes as an output of the AOT source set. That's not quite right as the classes are produced by compilation or resource processing of the source set. Instead, the generated classes should just be added to the source set's implementation configuration. That will make them available during compilation of the source set's source and also ensure that they're part of the source set's runtime classpath from where they can be consumed.

Comment From: wilkinsona

This broke nativeTest as classes generated by processTestAot are not on the classpath of the test native binary.