在老项目中使用Gradle:更改默认目录结构

时间:2020-12-30 10:01:50
apply plugin: 'war' sourceCompatibility = 1.5 version = "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/**';

}

}

}