Mixing .java files in a Gradle/Groovy project
Just create a Gradle build file for Groovy like:
apply plugin: "groovy"
repositories {
mavenCentral()
}
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.
Written by Chanwit Kaewkasi
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Groovy
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#