Multiple language plugins for one project, is it supported? (e.g. java + scala)


(chentongtc) #1

I have a question about using Scala and Java plugins for the same project. I tried Googling but there is nothing I can find. In our project, I have configured both Scala and Java plugins and sometimes we have weird compilation problems (error msg totally irrelevant, so posting it here not going to help).

My question is: has Gradle got any constraints on only supporting one “language nature” for one project (i.e. shouldn’t configure two language plugins)? Or this might just be a problem with using IDE (such as eclipse)?


(Peter Niederwieser) #2

Using the Java and Scala plugins in the same Gradle project is fully supported, and I’m not aware of any issues on Gradle’s side. (Same for Java and Groovy.) Configuration will be different depending on whether you want (some) joint compilation or not. IDEs typically do not offer this level of control and joint-compile everything (or either everything or nothing).