下面是配置范例 build.gradle:
apply plugin: 'groovy'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.7'
compile 'org.apache.ant:ant:1.9.4'
testCompile 'junit:junit:4.11'
testCompile 'commons-io:commons-io:2.2'
}
sourceSets {
main {
groovy {
srcDirs = ['./src/main/groovy']
include 'Main.groovy'