[技巧]在老项目中使用Gradle:更改默认目录结构
apply plugin: 'war'sourceCompatibility = 1.5version = "1.0"//中央仓库repositories {mavenCentral()}//加载本地依赖dependencies {providedCompile 'javax.servlet:jsp-api:2.0'providedCompile 'javax.servlet:servlet-api:2.5'providedCompile 'javax.transaction:jta:1.1'compile fileTree(dir: 'WebRoot/WEB-INF/lib', include: '*.jar')}//设置编码tasks.withType(Compile) {options.encoding = "UTF-8"//目录结构sourceSets {
main {
java {
srcDir 'src/cmes/java';
exclude 'com/dhcc/cmes/base/**';
}
}
}