forked from topseed/topseed-loadgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
67 lines (55 loc) · 1.18 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
//$ gradle assemble
apply plugin: 'java'
sourceSets {
main {
java {
srcDir 'src'
}
}
}
tasks.withType(JavaCompile) {
options.fork = true
options.debug = true
}
repositories {
mavenCentral()
}
def jarName = "loadGen.jar"
def needsVersion = "v1.01.25"
task cleanUp(dependsOn: assemble) {
println 'clean build'
delete './release/'+jarName
}
//zip up jars
task zipJars(dependsOn: cleanUp ) {
doLast {
ant.zip(destfile: './release/'+jarName) {
zipgroupfileset(dir: './libs')
zipgroupfileset(dir: './build/libs')
}
println 'zip'
}
}
defaultTasks 'copyRT'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.github.appthings:topseed4j:"+needsVersion
runtime "com.github.appthings:topseed4j:"+needsVersion
}
jar { // modify release
manifest {
attributes( 'Main-Class': 'Main',
'Class-Path': 'topseed4j-'+needsVersion+'.jar'
)}
from {
["prodResources/log4j.properties"]
}
}
// copy RT
task copyRT(type: Copy) {
dependsOn zipJars
into "release"
from configurations.runtime {
exclude 'poi-*'
}
}