Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (36 sloc) 1.07 KB
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'
)
}
}