I am trying to get joint/mixed compilation between all of Java, Groovy and Kotlin. I am currently working on a theory that it should be possible if groovyc can be made to just emit stub-files as a first stage.
Can it? Otherwise, any pointers towards making such a feature out of the sources of Groovy?
Here's the idea of full mixed compilation:
- Have Groovyc create Java-stubs for all its classes. AFAIU, it does this "blind", file by file, without seeing any other sources. (This is the kicker, and what this question is about: Have groovyc (or some part of it) generate only the stubs).
- Have Kotlinc compile Kotlin-files, basing typing on the Java files for Java, and the Java-stubs for Groovy (by adding them to kotlinc's classpath)
- Have Javac compile Java-files, basing typing on the Java-stubs of Groovy, and the class-files of Kotlin (by adding them to javac's classpath, or employ -sourcepath for the Java-stubs).
- Have Groovyc compile Groovy-files, basing typing on class-files for Java, and the class-files for Kotlin (by adding them to groovyc's classpath).