Last Updated: February 25, 2016
· chanwit

Mixing .java files in a Gradle/Groovy project

Just create a Gradle build file for Groovy like:

apply plugin: "groovy"

repositories {

and create the Groovy source directory: mkdir -p src/main/groovy.

You do not need to create the Java source directory (src/main/java). Put .java files along with others under the Groovy source directory and they will be compiled normally.