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'
|
2017-06-26 17:07:56 +00:00
|
|
|
apply plugin: 'com.jfrog.artifactory'
|
2016-12-06 15:25:38 +00:00
|
|
|
|
|
|
|
description 'Corda standalone node'
|
|
|
|
|
|
|
|
configurations {
|
2018-09-06 11:48:31 +00:00
|
|
|
runtimeArtifacts.extendsFrom runtimeClasspath
|
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"
|
2016-12-06 15:25:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
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 buildCordaJAR(type: FatCapsule, dependsOn: project(':node').tasks.jar) {
|
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(
|
2018-09-06 11:48:31 +00:00
|
|
|
project(':node').configurations.runtimeClasspath,
|
|
|
|
project(':node').tasks.jar,
|
|
|
|
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
|
|
|
|
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
|
|
|
|
project(':node').buildDir.toString() + '/resources/main/reference.conf',
|
|
|
|
"$rootDir/config/dev/log4j2.xml",
|
|
|
|
'NOTICE' // Copy CDDL notice
|
2017-05-05 12:12:36 +00:00
|
|
|
)
|
2017-11-15 15:03:15 +00:00
|
|
|
from configurations.capsuleRuntime.files.collect { zipTree(it) }
|
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
|
2018-11-22 13:53:14 +00:00
|
|
|
applicationId = "net.corda.node.Corda"
|
2017-08-30 16:13:25 +00:00
|
|
|
// See experimental/quasar-hook/README.md for how to generate.
|
2018-09-13 10:14:31 +00:00
|
|
|
def quasarExcludeExpression = "x(antlr**;bftsmart**;ch**;co.paralleluniverse**;com.codahale**;com.esotericsoftware**;com.fasterxml**;com.google**;com.ibm**;com.intellij**;com.jcabi**;com.nhaarman**;com.opengamma**;com.typesafe**;com.zaxxer**;de.javakaffee**;groovy**;groovyjarjarantlr**;groovyjarjarasm**;io.atomix**;io.github**;io.netty**;jdk**;junit**;kotlin**;net.bytebuddy**;net.i2p**;org.apache**;org.assertj**;org.bouncycastle**;org.codehaus**;org.crsh**;org.dom4j**;org.fusesource**;org.h2**;org.hamcrest**;org.hibernate**;org.jboss**;org.jcp**;org.joda**;org.junit**;org.mockito**;org.objectweb**;org.objenesis**;org.slf4j**;org.w3c**;org.xml**;org.yaml**;reflectasm**;rx**;org.jolokia**)"
|
2017-08-29 15:50:46 +00:00
|
|
|
javaAgents = ["quasar-core-${quasar_version}-jdk8.jar=${quasarExcludeExpression}"]
|
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.
|
2017-10-24 15:49:47 +00:00
|
|
|
// NOTE: these can be overridden in node.conf.
|
2017-01-11 17:43:45 +00:00
|
|
|
//
|
|
|
|
// If you change these flags, please also update Driver.kt
|
2018-03-26 12:41:37 +00:00
|
|
|
jvmArgs = ['-Xmx512m', '-XX:+UseG1GC']
|
2016-12-06 15:25:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-09-06 11:48:31 +00:00
|
|
|
assemble.dependsOn buildCordaJAR
|
2018-08-21 20:17:38 +00:00
|
|
|
|
2016-12-06 15:25:38 +00:00
|
|
|
artifacts {
|
|
|
|
runtimeArtifacts buildCordaJAR
|
|
|
|
publish buildCordaJAR {
|
2018-09-06 11:48:31 +00:00
|
|
|
classifier ''
|
2016-12-06 15:25:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publish {
|
|
|
|
disableDefaultJar = true
|
2017-07-18 11:34:56 +00:00
|
|
|
name 'corda'
|
2017-01-03 14:15:23 +00:00
|
|
|
}
|