Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
176 lines (134 loc) · 4.99 KB
/
Copy pathbuild.gradle
File metadata and controls
176 lines (134 loc) · 4.99 KB
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
plugins {
id 'java'
id 'groovy'
//id 'jacoco'
//id 'pmd'
id 'application'
id 'com.github.johnrengelman.shadow' version '1.2.4'
id 'com.github.ben-manes.versions' version '0.14.0'
//id 'com.jfrog.bintray' version '1.7.3'
//id 'org.ajoberstar.grgit' version '1.6.0'
// id 'net.ltgt.errorprone' version '0.0.10'
//id 'com.speedment.gradle' version '3.0.6'
}
ext {
group = 'myjo'
serverVersion = '0.0.2'
//longVersion = "$serverVersion-${grgit.head().abbreviatedId}"
date = new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
sourceCompatibility = 1.8
gradleVersion = '3.5'
log4jVersion = '2.8.1'
}
mainClassName = "com.myjo.ordercat.Main"
applicationName = 'OrderCat'
tasks.withType(JavaCompile) {
options.incremental = true
}
shadowJar {
baseName = 'OrderCat'
classifier = null
version = serverVersion
}
task ocJar{
dependsOn shadowJar
copy {
into "./artifact/conf"
from "./conf"
}
copy {
into "./artifact/bin"
from "./bin"
}
copy {
into "./artifact/lib"
from "./build/libs/${applicationName}-${serverVersion}.jar"
rename { String fileName ->
fileName.replace("-${serverVersion}", "")
}
}
}
//task collectConfs(type: Copy) {
//
//}
//bintray {
// user = System.getenv('BINTRAY_USER')
// key = System.getenv('BINTRAY_KEY')
//
// publish = true
// // override = true
//
// filesSpec {
// from 'build/libs'
// into '.'
// }
//
// pkg {
// repo = 'OrderCat'
// name = 'OrderCat'
// vcsUrl = 'https://github.com/lee5hx/OrderCat.git'
// licenses = ['GPL-3.0']
// githubRepo = 'lee5hx/OrderCat'
// githubReleaseNotesFile = 'README.md'
// labels = ['java']
//
// version {
// name = "$serverVersion"
// desc = "OrderCat $longVersion"
// released = new Date()
// }
// }
//}
task wrapper(type: Wrapper) {
gradleVersion = "$gradleVersion"
}
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
//maven { url "https://jitpack.io" }
mavenCentral()
}
dependencies {
//compile group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9'
compile "org.codehaus.groovy:groovy-all:2.4.6"
//compile 'com.squareup.okhttp3:okhttp:3.7.0'
compile group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
//csv
compile group: 'net.sf.supercsv', name: 'super-csv', version: '2.4.0'
//If you wish to use the Dozer extension (with deep mapping and index-based mapping support), then you will also need the following:
compile group: 'net.sf.supercsv', name: 'super-csv-dozer', version: '2.4.0'
//If you wish to use the Joda-Time extension (cell processors for parsing/formatting Joda-Time classes), then you will also need the following:
compile group: 'net.sf.supercsv', name: 'super-csv-joda', version: '2.4.0'
//If you wish to use the Java 8 extension (cell processors for parsing/formatting Java 8 classes), then you will also need the following:
compile group: 'net.sf.supercsv', name: 'super-csv-java8', version: '2.4.0'
//json
compile 'com.alibaba:fastjson:1.2.31'
//compile group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
// https://mvnrepository.com/artifact/org.jsoup/jsoup
compile group: 'org.jsoup', name: 'jsoup', version: '1.10.2'
// https://mvnrepository.com/artifact/com.beust/jcommander
compile group: 'com.beust', name: 'jcommander', version: '1.69'
//log
compile "org.apache.logging.log4j:log4j-core:$log4jVersion"
compile "org.apache.logging.log4j:log4j-api:$log4jVersion"
compile "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
compile files('./lib_tb/taobao-sdk-java-auto_1493016115732-20170424.jar')
compile 'joda-time:joda-time:2.9.9'
compile group: 'com.typesafe', name: 'config', version: '1.3.1'
//speedment
compile group: 'com.speedment', name: 'runtime', version: '3.0.6'
//mysql
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.40'
// https://mvnrepository.com/artifact/org.quartz-scheduler/quartz
compile group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.0'
compile group: 'org.quartz-scheduler', name: 'quartz-jobs', version: '2.3.0'
testCompile "org.spockframework:spock-core:1.1-groovy-2.4-rc-3"
// optional dependencies for using Spock
testCompile "org.hamcrest:hamcrest-core:1.3" // only necessary if Hamcrest matchers are used
testRuntime "cglib:cglib-nodep:3.2.4" // allows mocking of classes (in addition to interfaces)
testRuntime "org.objenesis:objenesis:2.5.1" // allows mocking of classes without default constructor (together with CGLIB)
// dependencies used by examples in this project
testRuntime "com.h2database:h2:1.4.182"
}
//apply from: "gradle/ide.gradle"
//