-
Notifications
You must be signed in to change notification settings - Fork 1
/
build1.gradle
43 lines (36 loc) · 1.07 KB
/
build1.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
apply plugin: 'java'
repositories {
mavenCentral()
mavenLocal()
maven { url 'https://maven.java.net/content/groups/public/' }
}
configurations {
capsule
natives
}
ext.avatarVer = '0.10.32-SNAPSHOT'
dependencies {
runtime "com.oracle:avatar-js:$avatarVer"
natives "com.oracle:libavatar-js-linux-x64:$avatarVer"
natives "com.oracle:libavatar-js-win-x64:$avatarVer"
natives "com.oracle:libavatar-js-macosx-x64:$avatarVer"
capsule 'co.paralleluniverse:capsule:1.0-rc1-SNAPSHOT'
}
task capsule(type: Jar) {
archiveName = 'hello-nodejs.jar'
from(configurations.capsule.collect { zipTree(it) })
from 'app.js'
from { configurations.runtime }
from { configurations.natives } {
rename 'libavatar-js-.+\\.(.+)', 'libavatar-js.$1'
}
manifest {
attributes(
'Main-Class' : 'Capsule',
'Application-Name' : 'hello-nodejs',
'Application-Class' : 'com.oracle.avatar.js.Server',
'Min-Java-Version' : '1.8.0',
'Args' : '$CAPSULE_DIR/app.js'
)
}
}