Closed vRallev closed 2 years ago
Sounds like a good idea. If you want to make a PR it would be very appreciated.
The tricky part is the result of the 2nd compilation where the class loader doesn't respect the output from the previous compilation
Can you elaborate on that? Perhaps it would be better if the result.classLoader
included kotlinCompilation.classpaths
by default.
Perhaps it would be better if the
result.classLoader
includedkotlinCompilation.classpaths
by default.
Ah, that's even better than what I suggested above. I've created a PR.
Feeding a new compilation with the output from a previous compilation isn't very hard, although I believe there could be a nicer API:
The tricky part is the result of the 2nd compilation where the class loader doesn't respect the output from the previous compilation. The workaround is to create a new class loader that uses all compilation results as input:
This is quite annoying, because one needs to be aware that
result.classLoader
gives misleading results.I wish the library would provide a better solution for this. If you're open for that, then I'm more than happy to create a PR.