-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
55 lines (45 loc) · 1.2 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
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = 1.6
targetCompatibility = 1.6
buildDir = 'build'
workDir = "${buildDir}/work"
appZip = 'vertx-sockjs-sample.zip'
vertxVersion='1.2.3.final'
repositories {
mavenCentral()
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
name = 'vertx.io'
addArtifactPattern 'http://[organisation]/downloads/[module]-[revision].[ext]'
}
}
configurations {
framework
}
dependencies {
compile "org.vert-x:vertx-platform:1.2.3.final"
framework "vertx.io:vert.x:${vertxVersion}@zip"
}
task runtime(type: Copy) {
destinationDir file("${workDir}")
from configurations.framework
doLast {
ant.unzip(src: "${workDir}/vert.x-${vertxVersion}.zip", dest: "${workDir}")
ant.delete(file: "${workDir}/vert.x-${vertxVersion}.zip")
}
}
task module(type: Copy, dependsOn: 'runtime') {
destinationDir file("${workDir}")
from("${buildDir}/classes/main") {
into 'mods/sockjs-sample'
}
from("${buildDir}/resources/main") {
into 'mods/sockjs-sample'
}
}
task assembleModule(type: Zip, dependsOn: 'module') {
destinationDir = file("${buildDir}")
outputs.dir destinationDir
archiveName = "${appZip}"
from file("${workDir}")
}