-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
104 lines (83 loc) · 2.96 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//GAV
group 'org.camunda.bpm.identity'
def artifactId = "camunda-user-plugins"
version '1.0.0'
//插件
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
sourceCompatibility = 1.8
targetCompatibility = 1.8
//统一编码为utf-8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
configurations.all {
//snapshot版本本地缓存失效时间,0表示不缓存,保证每次snapshot能实时更新到
// check for updates every build
resolutionStrategy{
// cache dynamic versions for 0 minutes
cacheDynamicVersionsFor 0, 'seconds'
// don't cache changing modules at all
cacheChangingModulesFor 0, 'seconds'
}
}
configurations{
providedCompile
/*全局排斥 common-log 、log4j、slf4j-log4j12 依赖*/
all*.exclude group: 'commons-logging', module: 'commons-logging'
all*.exclude group: 'log4j', module: 'log4j'
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
sourceSets {
main { compileClasspath += configurations.providedCompile }
test { compileClasspath += configurations.providedCompile }
}
//maven仓库
repositories {
mavenCentral()
}
//依赖包
dependencies {
//spring 依赖定义
def springVersion = '4.2.5.RELEASE'
compile "org.springframework:spring-aop:${springVersion}"
compile "org.springframework:spring-beans:${springVersion}"
compile "org.springframework:spring-core:${springVersion}"
compile "org.springframework:spring-expression:${springVersion}"
compile "org.springframework:spring-web:${springVersion}"
compile "org.springframework:spring-context-support:${springVersion}"
compile "org.springframework:spring-tx:${springVersion}"
compile "org.springframework:spring-jdbc:${springVersion}"
compile "org.springframework:spring-webmvc:${springVersion}"
compile "org.aspectj:aspectjweaver:1.8.9"
//db orm 依赖定义
compile 'org.mybatis:mybatis:3.4.0'
compile 'org.mybatis:mybatis-spring:1.3.0'
compile 'com.alibaba:druid:1.0.28'
compile "ojdbc:ojdbc6:11.2.0.1.0"
//公共包 依赖定义
compile "ch.qos.logback:logback-classic:1.1.7"
compile "ch.qos.logback:logback-access:1.1.7"
compile "org.slf4j:jcl-over-slf4j:1.7.21"
compile "org.slf4j:log4j-over-slf4j:1.7.21"
providedCompile 'org.camunda.bpm:camunda-engine:7.7.0'
providedCompile 'org.camunda.bpm:camunda-engine-spring:7.7.0'
providedCompile 'org.camunda.bpm.identity:camunda-identity-ldap:7.7.0'
testCompile "org.springframework:spring-test:${springVersion}"
testCompile "junit:junit:4.11"
}
task sourcesJar(type: Jar){
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts{
archives jar
archives sourcesJar
}
task snapshot (dependsOn: 'uploadArchives')
task release (dependsOn: 'uploadArchives')
gradle.taskGraph.whenReady { taskGraph ->
if(taskGraph.hasTask(snapshot)){
uploadArchives.repositories.mavenDeployer.pom.version = version + '-SNAPSHOT'
}
}