Since Kotlin appears to be a well-designed language with a number of very good design decisions and good interop with Java, I am thinking about including it as a language to use for programming solutions in a Java-based framework I am working on. So far this has been done by using embedded Java and Scala compilers.
What would be needed is a clean API that allows to directly compile Kotlin code present in memory, into memory, and make the compiled classes available directly through a classloader. The requirement is that the compilation must be performed memory to memory and ideally, all dependencies get resolved from a classloader, not by looking at actual jar files (this is where embedded Scala compiling can cause trouble).
Is this possible with Kotlin? If yes, could you please point me to some documentation or instructions how?
To be honest, the idea is to only look into Kotlin more in detail once it has been established that this is possible, if not, it does not make sense to consider it for this project.