2018-03-06 17:29:21 +00:00
|
|
|
/*
|
|
|
|
* R3 Proprietary and Confidential
|
|
|
|
*
|
|
|
|
* Copyright (c) 2018 R3 Limited. All rights reserved.
|
|
|
|
*
|
|
|
|
* The intellectual and technical concepts contained herein are proprietary to R3 and its suppliers and are protected by trade secret law.
|
|
|
|
*
|
|
|
|
* Distribution of this file or any portion thereof via any medium without the express permission of R3 is strictly prohibited.
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
2018-01-13 11:00:01 +00:00
|
|
|
description 'R3 Corda'
|
2016-12-06 15:25:38 +00:00
|
|
|
|
|
|
|
configurations {
|
|
|
|
runtimeArtifacts.extendsFrom runtime
|
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
|
|
|
|
|
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'
|
2018-01-13 11:00:01 +00:00
|
|
|
archiveName "corda-r3-${corda_release_version}.jar"
|
2017-05-05 12:12:36 +00:00
|
|
|
applicationSource = files(
|
2017-06-14 14:10:59 +00:00
|
|
|
project(':node').configurations.runtime,
|
2017-05-23 17:04:20 +00:00
|
|
|
project(':node').jar,
|
2017-08-24 14:58:41 +00:00
|
|
|
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet.class',
|
|
|
|
project(':node').sourceSets.main.java.outputDir.toString() + '/CordaCaplet$1.class',
|
2017-11-15 15:03:15 +00:00
|
|
|
"$rootDir/config/dev/log4j2.xml",
|
|
|
|
"$rootDir/node/build/resources/main/reference.conf"
|
2017-05-05 12:12:36 +00:00
|
|
|
)
|
2017-02-09 15:57:31 +00:00
|
|
|
from 'NOTICE' // Copy CDDL notice
|
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-01-22 16:21:28 +00:00
|
|
|
|
2017-08-30 16:13:25 +00:00
|
|
|
// See experimental/quasar-hook/README.md for how to generate.
|
2017-12-21 11:06:44 +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**;joptsimple**;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-06-13 15:11:38 +00:00
|
|
|
systemProperties['visualvm.display.name'] = 'CordaEnterprise'
|
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-25 12:54:34 +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
|
|
|
|
jvmArgs = ['-Xmx200m', '-XX:+UseG1GC']
|
2016-12-06 15:25:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
runtimeArtifacts buildCordaJAR
|
|
|
|
publish buildCordaJAR {
|
|
|
|
classifier ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
publish {
|
|
|
|
disableDefaultJar = true
|
2017-07-18 11:34:56 +00:00
|
|
|
name 'corda'
|
2017-01-03 14:15:23 +00:00
|
|
|
}
|