mirror of
https://github.com/corda/corda.git
synced 2025-01-27 22:59:54 +00:00
Added a new capsule build.gradle to allow multiple bintray uploads from one build.gradle.
This commit is contained in:
parent
348092cfa6
commit
810596927e
@ -92,7 +92,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile project(':node')
|
compile project(':node')
|
||||||
compile "com.google.guava:guava:19.0"
|
compile "com.google.guava:guava:19.0"
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
|
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
|
||||||
|
@ -36,7 +36,7 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileTestJava.dependsOn tasks.getByPath(':node:buildCordaJAR')
|
compileTestJava.dependsOn tasks.getByPath(':node:capsule:buildCordaJAR')
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
@ -48,7 +48,7 @@ dependencies {
|
|||||||
exclude group: "bouncycastle"
|
exclude group: "bouncycastle"
|
||||||
}
|
}
|
||||||
|
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
}
|
}
|
||||||
|
|
||||||
mainClassName = "net.corda.docs.ClientRpcTutorialKt"
|
mainClassName = "net.corda.docs.ClientRpcTutorialKt"
|
||||||
|
@ -2,7 +2,6 @@ apply plugin: 'kotlin'
|
|||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'net.corda.plugins.quasar-utils'
|
apply plugin: 'net.corda.plugins.quasar-utils'
|
||||||
apply plugin: 'net.corda.plugins.publish-utils'
|
apply plugin: 'net.corda.plugins.publish-utils'
|
||||||
apply plugin: 'us.kirchmeier.capsule'
|
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
|
|
||||||
@ -26,18 +25,8 @@ configurations {
|
|||||||
|
|
||||||
integrationTestCompile.extendsFrom testCompile
|
integrationTestCompile.extendsFrom testCompile
|
||||||
integrationTestRuntime.extendsFrom testRuntime
|
integrationTestRuntime.extendsFrom testRuntime
|
||||||
|
|
||||||
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 {
|
sourceSets {
|
||||||
integrationTest {
|
integrationTest {
|
||||||
kotlin {
|
kotlin {
|
||||||
@ -172,33 +161,6 @@ task integrationTest(type: Test) {
|
|||||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||||
}
|
}
|
||||||
|
|
||||||
task buildCordaJAR(type: FatCapsule, dependsOn: ['jar', 'buildCertSigningRequestUtilityJAR']) {
|
|
||||||
applicationClass 'net.corda.node.MainKt'
|
|
||||||
archiveName "corda-${corda_version}.jar"
|
|
||||||
applicationSource = files(project.tasks.findByName('jar'), 'build/classes/main/CordaCaplet.class', 'config/dev/log4j2.xml')
|
|
||||||
|
|
||||||
capsuleManifest {
|
|
||||||
appClassPath = ["jolokia-agent-war-${project.rootProject.ext.jolokia_version}.war"]
|
|
||||||
javaAgents = ["quasar-core-${quasar_version}-jdk8.jar"]
|
|
||||||
minJavaVersion = '1.8.0'
|
|
||||||
caplets = ['CordaCaplet']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task buildCertSigningRequestUtilityJAR(type: FatCapsule, dependsOn: project.jar) {
|
|
||||||
applicationClass 'net.corda.node.utilities.certsigning.CertificateSignerKt'
|
|
||||||
archiveName 'certSigningRequestUtility.jar'
|
|
||||||
capsuleManifest {
|
|
||||||
systemProperties['log4j.configuration'] = 'log4j2.xml'
|
|
||||||
minJavaVersion = '1.8.0'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
runtimeArtifacts buildCordaJAR
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bintray {
|
bintray {
|
||||||
user = System.getenv('CORDA_BINTRAY_USER')
|
user = System.getenv('CORDA_BINTRAY_USER')
|
||||||
key = System.getenv('CORDA_BINTRAY_KEY')
|
key = System.getenv('CORDA_BINTRAY_KEY')
|
||||||
@ -219,26 +181,6 @@ bintray {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = System.getenv('CORDA_BINTRAY_USER')
|
|
||||||
key = System.getenv('CORDA_BINTRAY_KEY')
|
|
||||||
publications = ['corda']
|
|
||||||
dryRun = false
|
|
||||||
pkg {
|
|
||||||
repo = 'corda'
|
|
||||||
name = 'corda'
|
|
||||||
userOrg = 'r3'
|
|
||||||
licenses = ['Apache-2.0']
|
|
||||||
|
|
||||||
version {
|
|
||||||
gpg {
|
|
||||||
sign = true
|
|
||||||
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
node(MavenPublication) {
|
node(MavenPublication) {
|
||||||
@ -276,41 +218,5 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
corda(MavenPublication) {
|
|
||||||
artifactId 'corda'
|
|
||||||
|
|
||||||
artifact buildCordaJAR {
|
|
||||||
classifier ""
|
|
||||||
}
|
|
||||||
|
|
||||||
pom.withXml {
|
|
||||||
asNode().children().last() + {
|
|
||||||
resolveStrategy = Closure.DELEGATE_FIRST
|
|
||||||
name 'corda'
|
|
||||||
description 'Corda standalone node'
|
|
||||||
url 'https://github.com/corda/corda'
|
|
||||||
scm {
|
|
||||||
url 'https://github.com/corda/corda'
|
|
||||||
}
|
|
||||||
|
|
||||||
licenses {
|
|
||||||
license {
|
|
||||||
name 'Apache-2.0'
|
|
||||||
url 'https://www.apache.org/licenses/LICENSE-2.0'
|
|
||||||
distribution 'repo'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
developers {
|
|
||||||
developer {
|
|
||||||
id 'R3'
|
|
||||||
name 'R3'
|
|
||||||
email 'dev@corda.net'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
127
node/capsule/build.gradle
Normal file
127
node/capsule/build.gradle
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
/**
|
||||||
|
* 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: 'maven-publish'
|
||||||
|
apply plugin: 'com.jfrog.bintray'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
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')
|
||||||
|
}
|
||||||
|
|
||||||
|
task buildCordaJAR(type: FatCapsule, dependsOn: ['jar', 'buildCertSigningRequestUtilityJAR']) {
|
||||||
|
applicationClass 'net.corda.node.MainKt'
|
||||||
|
archiveName "corda-${corda_version}.jar"
|
||||||
|
applicationSource = files(project.tasks.findByName('jar'), 'build/classes/main/CordaCaplet.class', 'config/dev/log4j2.xml')
|
||||||
|
|
||||||
|
capsuleManifest {
|
||||||
|
appClassPath = ["jolokia-agent-war-${project.rootProject.ext.jolokia_version}.war"]
|
||||||
|
javaAgents = ["quasar-core-${quasar_version}-jdk8.jar"]
|
||||||
|
minJavaVersion = '1.8.0'
|
||||||
|
caplets = ['CordaCaplet']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task buildCertSigningRequestUtilityJAR(type: FatCapsule, dependsOn: project.jar) {
|
||||||
|
applicationClass 'net.corda.node.utilities.certsigning.CertificateSignerKt'
|
||||||
|
archiveName 'certSigningRequestUtility.jar'
|
||||||
|
capsuleManifest {
|
||||||
|
systemProperties['log4j.configuration'] = 'log4j2.xml'
|
||||||
|
minJavaVersion = '1.8.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
runtimeArtifacts buildCordaJAR
|
||||||
|
}
|
||||||
|
|
||||||
|
bintray {
|
||||||
|
user = System.getenv('CORDA_BINTRAY_USER')
|
||||||
|
key = System.getenv('CORDA_BINTRAY_KEY')
|
||||||
|
publications = ['corda']
|
||||||
|
dryRun = false
|
||||||
|
pkg {
|
||||||
|
repo = 'corda'
|
||||||
|
name = 'corda'
|
||||||
|
userOrg = 'r3'
|
||||||
|
licenses = ['Apache-2.0']
|
||||||
|
|
||||||
|
version {
|
||||||
|
gpg {
|
||||||
|
sign = true
|
||||||
|
passphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
corda(MavenPublication) {
|
||||||
|
artifactId 'corda'
|
||||||
|
|
||||||
|
artifact buildCordaJAR {
|
||||||
|
classifier ""
|
||||||
|
}
|
||||||
|
|
||||||
|
pom.withXml {
|
||||||
|
asNode().children().last() + {
|
||||||
|
resolveStrategy = Closure.DELEGATE_FIRST
|
||||||
|
name 'corda'
|
||||||
|
description 'Corda standalone node'
|
||||||
|
url 'https://github.com/corda/corda'
|
||||||
|
scm {
|
||||||
|
url 'https://github.com/corda/corda'
|
||||||
|
}
|
||||||
|
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name 'Apache-2.0'
|
||||||
|
url 'https://www.apache.org/licenses/LICENSE-2.0'
|
||||||
|
distribution 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id 'R3'
|
||||||
|
name 'R3'
|
||||||
|
email 'dev@corda.net'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -45,7 +45,7 @@ dependencies {
|
|||||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||||
|
|
||||||
// Corda integration dependencies
|
// Corda integration dependencies
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
compile project(':client')
|
compile project(':client')
|
||||||
compile project(':node')
|
compile project(':node')
|
||||||
|
@ -48,7 +48,7 @@ dependencies {
|
|||||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||||
|
|
||||||
// Corda integration dependencies
|
// Corda integration dependencies
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
compile project(':client')
|
compile project(':client')
|
||||||
compile project(':node')
|
compile project(':node')
|
||||||
|
@ -21,7 +21,7 @@ dependencies {
|
|||||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||||
|
|
||||||
// Corda integration dependencies
|
// Corda integration dependencies
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
compile project(':client')
|
compile project(':client')
|
||||||
compile project(':node')
|
compile project(':node')
|
||||||
|
@ -45,7 +45,7 @@ dependencies {
|
|||||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||||
|
|
||||||
// Corda integration dependencies
|
// Corda integration dependencies
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
compile project(':client')
|
compile project(':client')
|
||||||
compile project(':node')
|
compile project(':node')
|
||||||
|
@ -41,7 +41,7 @@ dependencies {
|
|||||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||||
|
|
||||||
// Corda integration dependencies
|
// Corda integration dependencies
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
compile project(':client')
|
compile project(':client')
|
||||||
compile project(':node')
|
compile project(':node')
|
||||||
|
@ -45,7 +45,7 @@ dependencies {
|
|||||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||||
|
|
||||||
// Corda integration dependencies
|
// Corda integration dependencies
|
||||||
runtime project(path: ":node", configuration: 'runtimeArtifacts')
|
runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
compile project(':core')
|
compile project(':core')
|
||||||
compile project(':client')
|
compile project(':client')
|
||||||
compile project(':node')
|
compile project(':node')
|
||||||
|
@ -5,6 +5,7 @@ include 'finance'
|
|||||||
include 'finance:isolated'
|
include 'finance:isolated'
|
||||||
include 'core'
|
include 'core'
|
||||||
include 'node'
|
include 'node'
|
||||||
|
include 'node:capsule'
|
||||||
include 'client'
|
include 'client'
|
||||||
include 'experimental'
|
include 'experimental'
|
||||||
include 'experimental:sandbox'
|
include 'experimental:sandbox'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user