2016-12-06 15:25:38 +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 standalone node'
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
runtimeArtifacts.extendsFrom runtime
|
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
test {
|
|
|
|
resources {
|
|
|
|
srcDir "../../config/test"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
main {
|
|
|
|
resources {
|
|
|
|
srcDir "../../config/dev"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(':node')
|
|
|
|
}
|
|
|
|
|
2017-02-20 13:22:37 +00:00
|
|
|
task buildCordaJAR(type: FatCapsule) {
|
2017-01-11 17:43:45 +00:00
|
|
|
applicationClass 'net.corda.node.Corda'
|
2016-12-06 15:25:38 +00:00
|
|
|
archiveName "corda-${corda_version}.jar"
|
2017-02-23 11:44:09 +00:00
|
|
|
applicationSource = files(project.tasks.findByName('jar'), '../build/classes/main/CordaCaplet.class', '../build/classes/main/CordaCaplet$1.class', 'config/dev/log4j2.xml')
|
2017-02-09 15:57:31 +00:00
|
|
|
from 'NOTICE' // Copy CDDL notice
|
2016-12-06 15:25:38 +00:00
|
|
|
|
|
|
|
capsuleManifest {
|
2017-02-02 18:21:00 +00:00
|
|
|
applicationVersion = corda_version
|
2016-12-06 15:25:38 +00:00
|
|
|
appClassPath = ["jolokia-agent-war-${project.rootProject.ext.jolokia_version}.war"]
|
|
|
|
javaAgents = ["quasar-core-${quasar_version}-jdk8.jar"]
|
2017-01-11 17:43:45 +00:00
|
|
|
systemProperties['visualvm.display.name'] = 'Corda'
|
2016-12-06 15:25:38 +00:00
|
|
|
minJavaVersion = '1.8.0'
|
2017-04-21 15:26:35 +00:00
|
|
|
minUpdateVersion['1.8'] = java8_minUpdateVersion
|
2016-12-06 15:25:38 +00:00
|
|
|
caplets = ['CordaCaplet']
|
2017-01-11 17:43:45 +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']
|
2016-12-06 15:25:38 +00:00
|
|
|
}
|
2017-01-23 12:59:45 +00:00
|
|
|
|
2017-03-05 14:38:50 +00:00
|
|
|
// Make the resulting JAR file directly executable on UNIX by prepending a shell script to it.
|
|
|
|
// This lets you run the file like so: ./corda.jar
|
|
|
|
// Other than being slightly less typing, this has one big advantage: Ctrl-C works properly in the terminal.
|
|
|
|
reallyExecutable { trampolining() }
|
|
|
|
|
2017-01-23 12:59:45 +00:00
|
|
|
manifest {
|
|
|
|
attributes('Corda-Version': corda_version)
|
2017-03-06 14:19:04 +00:00
|
|
|
attributes('Corda-Revision': corda_revision)
|
|
|
|
attributes('Corda-Vendor': 'Corda Open Source')
|
2017-01-23 12:59:45 +00:00
|
|
|
}
|
2016-12-06 15:25:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
runtimeArtifacts buildCordaJAR
|
|
|
|
publish buildCordaJAR {
|
|
|
|
classifier ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publish {
|
|
|
|
name = 'corda'
|
|
|
|
disableDefaultJar = true
|
2017-01-03 14:15:23 +00:00
|
|
|
}
|