-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
47 lines (35 loc) · 921 Bytes
/
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
group 'SF_AutoCheckIn'
version '1.2-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
dependencies {
// jsoup HTML parser library @ https://jsoup.org/
compile 'org.jsoup:jsoup:1.11.2'
compile 'com.alibaba:fastjson:1.2.41'
}
jar {
String someString = ''
configurations.runtime.each {someString = someString + " lib\\"+it.name} //遍历项目的所有依赖的jar包赋值给变量someString
manifest {
attributes 'Main-Class': 'Entrance'
attributes 'Class-Path': someString
}
}
task clearPj(type:Delete){
delete 'build','target'
}
task copyJar(type:Copy){
from configurations.runtime
into ('build/libs/lib')
}
task release(type: Copy,dependsOn: [build,copyJar]) {
// from 'conf'
// into ('build/libs/eachend/conf')
}