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
|
|
|
|
|
2017-05-23 17:04:20 +00:00
|
|
|
task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').compileJava) {
|
2017-01-11 17:43:45 +00:00
|
|
|
applicationClass 'net.corda.node.Corda'
|
2017-04-19 10:05:27 +00:00
|
|
|
archiveName "corda-${corda_release_version}.jar"
|
2017-05-05 12:12:36 +00:00
|
|
|
applicationSource = files(
|
2017-05-23 17:04:20 +00:00
|
|
|
project(':node').configurations.compile,
|
|
|
|
project(':node').jar,
|
2017-05-05 12:12:36 +00:00
|
|
|
'../build/classes/main/CordaCaplet.class',
|
|
|
|
'../build/classes/main/CordaCaplet$1.class',
|
|
|
|
"$rootDir/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
|
|
|
|
2017-05-10 17:42:21 +00:00
|
|
|
|
2016-12-06 15:25:38 +00:00
|
|
|
capsuleManifest {
|
2017-04-19 10:05:27 +00:00
|
|
|
applicationVersion = corda_release_version
|
2016-12-06 15:25:38 +00:00
|
|
|
appClassPath = ["jolokia-agent-war-${project.rootProject.ext.jolokia_version}.war"]
|
2017-05-10 17:42:21 +00:00
|
|
|
// TODO add this once we upgrade quasar to 0.7.8
|
|
|
|
// def quasarExcludeExpression = "x(rx**;io**;kotlin**;jdk**;reflectasm**;groovyjarjarasm**;groovy**;joptsimple**;groovyjarjarantlr**;javassist**;com.fasterxml**;com.typesafe**;com.google**;com.zaxxer**;com.jcabi**;com.codahale**;com.esotericsoftware**;de.javakaffee**;org.objectweb**;org.slf4j**;org.w3c**;org.codehaus**;org.h2**;org.crsh**;org.fusesource**;org.hibernate**;org.dom4j**;org.bouncycastle**;org.apache**;org.objenesis**;org.jboss**;org.xml**;org.jcp**;org.jetbrains**;org.yaml**;co.paralleluniverse**;net.i2p**)"
|
|
|
|
// javaAgents = ["quasar-core-${quasar_version}-jdk8.jar=${quasarExcludeExpression}"]
|
2016-12-06 15:25:38 +00:00
|
|
|
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() }
|
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
|
|
|
}
|