-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.gradle
149 lines (119 loc) · 3.98 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
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.6.2.201302030002"
reportsDir = file("$buildDir/JacocoReportDir")
}
archivesBaseName = 'sparkngin'
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}
eclipse {
project {
name = 'Sparkngin'
}
classpath {
downloadSources=true
}
}
eclipse.classpath.defaultOutputDir = file( 'build/classes' )
group = 'com.neverwinterdp'
sourceCompatibility = 1.7
version = '1.0-SNAPSHOT'
configurations.compile.transitive = true
project.ext {
kafkaVersion = "0.8.1.1"
zookeeperVersion = "3.4.6"
jettyVersion = "9.2.0.M0"
}
repositories {
mavenLocal()
mavenCentral()
}
test {
forkEvery = 1
ignoreFailures = true
testLogging.showStandardStreams = true
filter {
includeTestsMatching "*UnitTest"
}
}
dependencies {
compile group: 'com.neverwinterdp', name: 'commons.utils', version: '1.0-SNAPSHOT'
compile group: 'com.neverwinterdp', name: 'commons.buffer', version: '1.0-SNAPSHOT'
compile group: 'com.neverwinterdp', name: 'commons.api', version: '1.0-SNAPSHOT'
compile group: 'com.neverwinterdp', name: 'commons.netty', version: '1.0-SNAPSHOT'
compile group: 'com.neverwinterdp', name: 'commons.cluster', version: '1.0-SNAPSHOT'
compile group: 'com.neverwinterdp', name: 'commons.yara.core', version: '1.0-SNAPSHOT'
compile group: 'com.neverwinterdp', name: 'commons.zookeeper', version: '1.0-SNAPSHOT'
compile group: 'com.neverwinterdp', name: 'queuengin', version: '1.0-SNAPSHOT'
compile group: 'com.jcraft', name: 'jzlib', version: '1.1.3'
compile group: 'net.openhft', name: 'chronicle', version: '2.0.3'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.5'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.5'
testCompile group: 'org.easymock', name: 'easymock', version: '3.1'
testCompile group: 'junit', name: 'junit', version: '4.11'
testCompile group: 'org.eclipse.jetty', name: 'jetty-server', version: project.jettyVersion
testCompile group: 'org.eclipse.jetty', name: 'jetty-webapp', version: project.jettyVersion
testCompile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3'
testCompile group: 'io.vertx', name: 'vertx-core', version: '2.1RC2'
testCompile group: 'io.vertx', name: 'vertx-platform', version: '2.1RC2'
testCompile group: 'io.vertx', name: 'testtools', version: '2.0.3-final'
}
test {
forkEvery = 1
ignoreFailures = true
testLogging.showStandardStreams = true
filter {
includeTestsMatching "*UnitTest"
}
}
task release (dependsOn: 'build') << {
def releaseDir = "${buildDir}/release/sparkngin"
doRelease(releaseDir) ;
}
def doRelease(String releaseDir) {
println "\n\n"
println "*************************************************"
println "Preparing the release directory ${releaseDir}"
println "*************************************************"
println "Copy the scripts"
copy {
from "src/app"
into "${releaseDir}"
}
def jars = [
"commons.utils", "commons.api", "commons.yara", "commons.cluster", "commons.netty", "commons.zookeeper", "queuengin",
"jackson-core-2.2.2", "jackson-databind", "jackson-annotations", "jcommander", "reflections", "guava", "javassist",
'guice', 'javax.inject', 'hazelcast', 'aopalliance',
"kafka", "scala-library",
'zookeeper', 'zkclient',
"metrics-core", //"metrics-json", "metrics-annotation",
"netty-all", 'jzlib', 'chronicle', "lang-6.1.4",
"log4j", "slf4j-api", "slf4j-log4j12"
]
println "Copy the dependency library"
configurations.compile.each { File file ->
if(isIn(jars, file)) {
println " Copy $file.name to sparkngin/libs"
copy {
from file
into "${releaseDir}/libs"
}
} else {
//println "Ignore $file.name "
}
}
copy {
from "${buildDir}/libs"
into "${releaseDir}/libs"
}
}
def isIn(set, File file) {
for(item in set) {
if(file.name.startsWith(item)) return true ;
}
return false ;
}