2017-03-10 13:58:06 +00:00
|
|
|
/**
|
|
|
|
* This build.gradle exists to publish our capsule (executable fat jar) to maven. It cannot be placed in the
|
|
|
|
* node project because the bintray plugin cannot publish two modules from one project.
|
|
|
|
*/
|
|
|
|
apply plugin: 'net.corda.plugins.publish-utils'
|
|
|
|
apply plugin: 'us.kirchmeier.capsule'
|
|
|
|
|
|
|
|
description 'Corda node web server capsule'
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
runtimeArtifacts
|
|
|
|
}
|
|
|
|
|
|
|
|
// Force the Caplet to target Java 6. This ensures that running 'java -jar corda.jar' on any Java 6 VM upwards
|
|
|
|
// will get as far as the Capsule version checks, meaning that if your JVM is too old, you will at least get
|
|
|
|
// a sensible error message telling you what to do rather than a bytecode version exception that doesn't.
|
|
|
|
// If we introduce .java files into this module that need Java 8+ then we will have to push the caplet into
|
|
|
|
// its own module so its target can be controlled individually, but for now this suffices.
|
|
|
|
sourceCompatibility = 1.6
|
|
|
|
targetCompatibility = 1.6
|
|
|
|
|
|
|
|
dependencies {
|
2017-03-30 16:34:32 +00:00
|
|
|
compile project(':webserver')
|
2017-03-10 13:58:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
task buildWebserverJar(type: FatCapsule) {
|
|
|
|
applicationClass 'net.corda.webserver.WebServer'
|
2017-04-19 10:05:27 +00:00
|
|
|
archiveName "corda-webserver-${corda_release_version}.jar"
|
2017-03-24 17:14:20 +00:00
|
|
|
applicationSource = files(
|
2017-04-11 10:54:37 +00:00
|
|
|
project.tasks.findByName('jar'),
|
|
|
|
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet.class'),
|
|
|
|
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet$1.class'),
|
2017-05-05 12:12:36 +00:00
|
|
|
"$rootDir/config/dev/log4j2.xml"
|
2017-03-24 17:14:20 +00:00
|
|
|
)
|
2017-03-10 13:58:06 +00:00
|
|
|
from 'NOTICE' // Copy CDDL notice
|
|
|
|
|
|
|
|
capsuleManifest {
|
2017-04-19 10:05:27 +00:00
|
|
|
applicationVersion = corda_release_version
|
2017-03-10 13:58:06 +00:00
|
|
|
javaAgents = ["quasar-core-${quasar_version}-jdk8.jar"]
|
|
|
|
systemProperties['visualvm.display.name'] = 'Corda Webserver'
|
|
|
|
minJavaVersion = '1.8.0'
|
2017-04-21 15:26:35 +00:00
|
|
|
minUpdateVersion['1.8'] = java8_minUpdateVersion
|
2017-03-10 13:58:06 +00:00
|
|
|
caplets = ['CordaCaplet']
|
|
|
|
|
|
|
|
// JVM configuration:
|
|
|
|
// - Constrain to small heap sizes to ease development on low end devices.
|
|
|
|
// - Switch to the G1 GC which is going to be the default in Java 9 and gives low pause times/string dedup.
|
|
|
|
//
|
|
|
|
// If you change these flags, please also update Driver.kt
|
|
|
|
jvmArgs = ['-Xmx200m', '-XX:+UseG1GC']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
runtimeArtifacts buildWebserverJar
|
|
|
|
publish buildWebserverJar {
|
|
|
|
classifier ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publish {
|
|
|
|
name = 'corda-webserver'
|
|
|
|
publishWar = false // TODO: Use WAR instead of JAR
|
|
|
|
disableDefaultJar = true
|
2017-04-21 15:26:35 +00:00
|
|
|
}
|