-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
54 lines (41 loc) · 1.14 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
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
group = 'com.yinheli.tool'
version = '1.0.0'
[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
test {
jvmArgs '-noverify'
}
targetCompatibility = '1.8'
sourceCompatibility = '1.8'
dependencies {
compile 'mysql:mysql-connector-java:5.1.20'
compile 'org.mybatis.generator:mybatis-generator-core:1.3.5'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'commons-cli:commons-cli:1.3.1'
compile 'io.swagger:swagger-annotations:1.5.10'
testCompile 'junit:junit:4.12'
}
jar {
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest {
attributes 'Main-Class': 'com.yinheli.tool.mybatis.cli.MybatisToolCLI',
'Git-Revision': 'git rev-parse HEAD'.execute().text.trim()
}
}
task dist(dependsOn: jar) {
jar.doLast {
delete {
"$buildDir/dist"
}
copy {
from "$buildDir/libs"
into "$buildDir/dist"
}
copy {
from 'mybatis-generator-tool.sh'
into "$buildDir/dist"
}
}
}