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

Leon.Wood 2012-12-18

 

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/**';

}

}

}

Global site tag (gtag.js) - Google Analytics