forked from baomidou/mybatis-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
201 lines (174 loc) · 8 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
ext {
configuration = [
javaVersion = JavaVersion.VERSION_1_8
]
libraries = [
mybatisSpringVersion = '1.3.2',
mybatisVersion = '3.4.6',
springVersion = '4.3.5.RELEASE',
springBootVersion = '2.0.1.RELEASE',
jsqlparserVersion = '1.2',
]
dependencies = [
"jsqlparser" : "com.github.jsqlparser:jsqlparser:${jsqlparserVersion}",
"mybatis-spring" : "org.mybatis:mybatis-spring:${mybatisSpringVersion}",
"mybatis" : "org.mybatis:mybatis:${mybatisVersion}",
"spring-context-support" : "org.springframework:spring-context-support:${springVersion}",
"spring-jdbc" : "org.springframework:spring-jdbc:${springVersion}",
"spring-tx" : "org.springframework:spring-tx:${springVersion}",
"spring-web" : "org.springframework:spring-web:${springVersion}",
"spring-aop" : "org.springframework:spring-aop:${springVersion}",
"cglib" : "cglib:cglib:3.2.6",
"javax.servlet-api" : "javax.servlet:javax.servlet-api:4.0.1",
"aspectjweaver" : "org.aspectj:aspectjweaver:1.8.9",
"mockito" : "org.mockito:mockito-core:2.13.0",
"mybatis-ehcache" : "org.mybatis.caches:mybatis-ehcache:1.1.0",
"slf4j-api" : "org.slf4j:slf4j-api:1.7.25",
"logback-classic" : "ch.qos.logback:logback-classic:1.2.2",
//test
"spring-test" : "org.springframework:spring-test:${springVersion}",
"junit" : "junit:junit:4.12",
"mockito-all" : "org.mockito:mockito-all:1.10.19",
"lombok" : "org.projectlombok:lombok:1.16.20",
"fastjson" : "com.alibaba:fastjson:1.2.49",
"jackson" : "com.fasterxml.jackson.core:jackson-databind:2.9.6",
"tomcatjdbc" : "org.apache.tomcat:tomcat-jdbc:9.0.2",
//datasource
"hikaricp" : "com.zaxxer:HikariCP:2.7.0",
"druid" : "com.alibaba:druid:1.0.29",
"commons-dbcp2" : "org.apache.commons:commons-dbcp2:2.1.1",
"sqlserver" : "com.microsoft.sqlserver:sqljdbc4:4.0",
"postgresql" : "org.postgresql:postgresql:9.4.1212",
"oracle" : "com.oracle:ojdbc14:10.2.0.5.0",
"h2" : "com.h2database:h2:1.4.194",
"mysql" : "mysql:mysql-connector-java:5.1.38",
//code generator
"velocity" : "org.apache.velocity:velocity-engine-core:2.0",
"freemarker" : "org.freemarker:freemarker:2.3.9",
// spring boot
"springboot-autoconfigure" : "org.springframework.boot:spring-boot-autoconfigure:${springBootVersion}",
"springboot-configuration-processor": "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}",
"springboot-starter-jdbc" : "org.springframework.boot:spring-boot-starter-jdbc:${springBootVersion}",
]
}
allprojects {
group = 'com.baomidou'
version = '3.0.2'
}
description = "Mybatis 增强工具包 - 只做增强不做改变,简化CRUD操作"
buildscript {
repositories {
maven { url "https://repo.spring.io/plugins-release" }
}
dependencies {
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
}
}
configure(subprojects) {
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
}
subprojects {
apply plugin: 'java'
apply plugin: 'signing'
sourceCompatibility = "${javaVersion}"
targetCompatibility = "${javaVersion}"
//noinspection GroovyAssignabilityCheck
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "http://www.cameliatk.jp/maven2/repository/thirdparty" }
jcenter()
}
dependencies {
compileOnly rootProject.ext.dependencies["lombok"]
testCompile rootProject.ext.dependencies["mockito-all"]
testCompile rootProject.ext.dependencies["lombok"]
testCompile rootProject.ext.dependencies["junit"]
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
javadoc {
options {
encoding "UTF-8"
charSet 'UTF-8'
author true
version true
failOnError false
links "http://docs.oracle.com/javase/8/docs/api"
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from 'build/docs/javadoc'
}
artifacts {
archives sourcesJar
archives javadocJar
}
tasks.whenTaskAdded { task ->
if (task.name.contains('uploadArchives') || task.name.contains("signArchives")) {
task.enabled = new File(project.property('signing.secretKeyRingFile') as String).isFile()
}
}
signing {
sign configurations.archives
}
// gradle clean build uploadArchives -Dun=用户名 -Dps=密码 -x test
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
def userName = System.getProperty("un")
def passWord = System.getProperty("ps")
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
//noinspection GroovyAssignabilityCheck
authentication(userName: userName, password: passWord)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
//noinspection GroovyAssignabilityCheck
authentication(userName: userName, password: passWord)
}
pom.version = "$project.version"
pom.artifactId = "$project.name"
pom.groupId = "$project.group"
pom.project {
//noinspection GroovyAssignabilityCheck
name 'mybatis-plus'
packaging 'jar'
description 'An enhanced toolkit of Mybatis to simplify development.'
url 'https://github.com/baomidou/mybatis-plus'
scm {
connection 'scm:[email protected]:Codearte/gradle-nexus-staging-plugin.git'
developerConnection 'scm:[email protected]:Codearte/gradle-nexus-staging-plugin.git'
url 'https://github.com/baomidou/mybatis-plus'
}
licenses {
license {
//noinspection GroovyAssignabilityCheck
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'baomidou'
//noinspection GroovyAssignabilityCheck
name 'hubin'
email '[email protected]'
}
}
}
}
}
}
compileJava.dependsOn(processResources)
}