/** * 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' apply plugin: 'com.jfrog.artifactory' description 'Corda standalone node' configurations { runtimeArtifacts.extendsFrom runtimeClasspath capsuleRuntime } dependencies { // TypeSafe Config: for simple and human friendly config files. capsuleRuntime "com.typesafe:config:$typesafe_config_version" compileOnly "com.typesafe:config:$typesafe_config_version" testRuntimeOnly "com.typesafe:config:$typesafe_config_version" // Capsule is a library for building independently executable fat JARs. // We only need this dependency to compile our Caplet against. compileOnly "co.paralleluniverse:capsule:$capsule_version" testCompile "co.paralleluniverse:capsule:$capsule_version" testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}" testImplementation "junit:junit:$junit_version" } jar.enabled = false capsule { version capsule_version } task buildCordaJAR(type: FatCapsule, dependsOn: project(':node').tasks.jar) { applicationClass 'net.corda.node.Corda' archiveBaseName = 'corda' archiveVersion = corda_release_version archiveClassifier = jdkClassifier archiveName = archiveFileName.get() applicationSource = files( project(':node').configurations.runtimeClasspath, project(':node').tasks.jar, project(':node').buildDir.toString() + '/resources/main/reference.conf', "$rootDir/config/dev/log4j2.xml", 'NOTICE' // Copy CDDL notice ) from configurations.capsuleRuntime.files.collect { zipTree(it) } with jar capsuleManifest { applicationVersion = corda_release_version applicationId = "net.corda.node.Corda" // See experimental/quasar-hook/README.md for how to generate. def quasarExcludeExpression = "x(antlr**;bftsmart**;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**;com.lmax**;picocli**;liquibase**;com.github.benmanes**;org.json**;org.postgresql**;nonapi.io.github.classgraph**)" javaAgents = quasar_classifier == null ? ["quasar-core-${quasar_version}.jar=${quasarExcludeExpression}"] : ["quasar-core-${quasar_version}-${quasar_classifier}.jar=${quasarExcludeExpression}"] systemProperties['visualvm.display.name'] = 'Corda' if (JavaVersion.current() == JavaVersion.VERSION_1_8) { minJavaVersion = '1.8.0' minUpdateVersion['1.8'] = java8_minUpdateVersion } caplets = ['CordaCaplet'] // 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. // NOTE: these can be overridden in node.conf. // // If you change these flags, please also update Driver.kt jvmArgs = ['-Xmx512m', '-XX:+UseG1GC'] if (JavaVersion.current() == JavaVersion.VERSION_11) jvmArgs += ['-Djdk.attach.allowAttachSelf=true'] } } assemble.dependsOn buildCordaJAR artifacts { runtimeArtifacts buildCordaJAR publish buildCordaJAR { classifier '' } } publish { disableDefaultJar = true name 'corda' }