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
|
2018-09-06 11:48:31 +00:00
|
|
|
* webserver project because the bintray plugin cannot publish two modules from one project.
|
2017-03-10 13:58:06 +00:00
|
|
|
*/
|
|
|
|
apply plugin: 'net.corda.plugins.publish-utils'
|
|
|
|
apply plugin: 'us.kirchmeier.capsule'
|
2017-06-26 17:07:56 +00:00
|
|
|
apply plugin: 'com.jfrog.artifactory'
|
2017-03-10 13:58:06 +00:00
|
|
|
|
|
|
|
description 'Corda node web server capsule'
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
runtimeArtifacts
|
2017-11-15 15:03:15 +00:00
|
|
|
capsuleRuntime
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
// TypeSafe Config: for simple and human friendly config files.
|
|
|
|
capsuleRuntime "com.typesafe:config:$typesafe_config_version"
|
2017-03-10 13:58:06 +00:00
|
|
|
}
|
|
|
|
|
2018-09-06 11:48:31 +00:00
|
|
|
jar.enabled = false
|
|
|
|
|
2018-09-17 12:55:31 +00:00
|
|
|
capsule {
|
|
|
|
version capsule_version
|
|
|
|
}
|
|
|
|
|
2018-09-06 11:48:31 +00:00
|
|
|
task buildWebserverJar(type: FatCapsule, dependsOn: project(':node').tasks.jar) {
|
2017-03-10 13:58:06 +00:00
|
|
|
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(
|
2018-09-06 11:48:31 +00:00
|
|
|
project(':webserver').configurations.runtimeClasspath,
|
|
|
|
project(':webserver').tasks.jar,
|
2018-12-21 14:04:12 +00:00
|
|
|
project(':webserver').sourceSets.main.java.outputDir.toString() + '/CordaWebserverCaplet.class',
|
|
|
|
project(':webserver').sourceSets.main.java.outputDir.toString() + '/CordaWebserverCaplet$1.class',
|
2018-09-06 11:48:31 +00:00
|
|
|
project(':node').buildDir.toString() + '/resources/main/reference.conf',
|
|
|
|
"$rootDir/config/dev/log4j2.xml",
|
|
|
|
project(':node:capsule').projectDir.toString() + '/NOTICE' // Copy CDDL notice
|
2017-03-24 17:14:20 +00:00
|
|
|
)
|
2017-11-15 15:03:15 +00:00
|
|
|
from configurations.capsuleRuntime.files.collect { zipTree(it) }
|
2017-03-10 13:58:06 +00:00
|
|
|
|
|
|
|
capsuleManifest {
|
2017-04-19 10:05:27 +00:00
|
|
|
applicationVersion = corda_release_version
|
2019-09-18 09:26:26 +00:00
|
|
|
javaAgents = ["quasar-core-${quasar_version}.jar"]
|
2017-03-10 13:58:06 +00:00
|
|
|
systemProperties['visualvm.display.name'] = 'Corda Webserver'
|
|
|
|
minJavaVersion = '1.8.0'
|
2017-04-21 15:26:35 +00:00
|
|
|
minUpdateVersion['1.8'] = java8_minUpdateVersion
|
2018-12-21 14:04:12 +00:00
|
|
|
caplets = ['CordaWebserverCaplet']
|
2017-03-10 13:58:06 +00:00
|
|
|
|
|
|
|
// 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']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-06 11:48:31 +00:00
|
|
|
assemble.dependsOn buildWebserverJar
|
|
|
|
|
2017-03-10 13:58:06 +00:00
|
|
|
artifacts {
|
|
|
|
runtimeArtifacts buildWebserverJar
|
|
|
|
publish buildWebserverJar {
|
2018-09-06 11:48:31 +00:00
|
|
|
classifier ''
|
2017-03-10 13:58:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publish {
|
|
|
|
disableDefaultJar = true
|
2017-07-18 11:34:56 +00:00
|
|
|
name 'corda-webserver'
|
2017-04-21 15:26:35 +00:00
|
|
|
}
|