Scala, Java and Groovy joint compilation


(Günther Grill) #1

Hi there,

we currently use the three languages groovy, scala and of course java.
But when it comes to joint compilation, we have problems when those languages are mixed together.

After a little research it turns out, that this problem should be solved by compiling in the following order:

http://www.scala-lang.org/old/node/1044.html

  1. Generate Java stubs from Groovy sources
  2. Compile Scala code using Java sources and generated stubs on the way
  3. Compile all Java code with generated stubs and compiled Scala classes
  4. Compile Groovy code with already compiled Java classes

So my question is now, how can I tell groovy via gradle just to generate stubs, and then tell the scala compiler to use those for compilation?

regards
Guenther


(Günther Grill) #2

Don’t do it! Three language is too many.