• 设置是否下载源码和文档

eclipse

eclipse.classpath {
    // settings for downloading sources and Javadoc:
    downloadSources = true
    downloadJavadoc = false
}

idea

idea {
    module {
        downloadJavadoc = false
        downloadSources = false
    }
}
  • 设置src/main/webapp为eclipse的资源包
eclipse.classpath.file {
    withXml {
        if(!node.any { it.attribute('path') == "src/main/webapp" }) {
            node.appendNode('classpathentry', [kind:'src', path:'src/main/webapp'])
        }
    }
}
  • 解决乱码
[compileJava, javadoc, compileTestJava]*.options*.encoding = 'UTF-8'