-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (64 loc) · 2.3 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
group 'cn.org.escience.log'
version '1.0-SNAPSHOT'
allprojects {
apply plugin: "idea"
apply plugin: "eclipse"
}
buildscript {
repositories {
jcenter()
mavenLocal()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
}
ext {
slf4jVersion = '1.7.25'
springbootVer = '1.5.6.RELEASE'
}
dependencies {
}
}
subprojects {
apply plugin: "java"
repositories {
jcenter()
mavenLocal()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
}
// JVM 版本号要求
sourceCompatibility = 1.8
targetCompatibility = 1.8
// java编译的时候缺省状态下会因为中文字符而失败
[compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
//model处理
compile 'org.projectlombok:lombok:1.16.18'
//日志
compile group: 'commons-logging', name: 'commons-logging', version: '1.1.1'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
//日志相关 end
//json信息处理
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.1'
}
//在 configure 属性块根据模块名称引入特定插件
configure(subprojects.findAll {it.name.contains('web')}) {
apply plugin: 'war'
}
configurations {
// 所有需要忽略的包定义在此
// all*.exclude group: 'commons-logging'
// all*.exclude module : 'spring-boot-starter-logging'
// compile.exclude group:'ch.qos.logback'
}
// 显示当前项目下所有用于 compile 的 jar.
task listJars(description: 'Display all compile jars.') << {
println '======================================'
configurations.compile.each { File file -> println file.name }
}
}