[CORDA-2077] Use latest gradle plugin version (4.0.32), set target version in core and sample CorDapps (#4038)

* Upgrade gradle plugin; add target version attribute to finance and sample cordapps.
* Remove '-SNAPSHOT' from gradlePluginsVersion.
* Fix naming.
* Update docs.
* Respond to feedback.
* Fix irs demo
* Fix more samples
* Fix more samples
* Fix deployNodes
* Fix deployNodes
* more fixes
* fix simm valuation
* more fixes
* more fixes
* more fixes
* more fixes
* Publication should have *nothing* to do with cordformation and deployNodes.
Remove it! And if this exposes a bug then "so be it".
* Disable CorDapp signing for Cordapp Configuration and Network Verifier.
* Disable CorDapp signing for SIMM Valuation Demo.
* Remove remaining publishing nonsense from samples.
* Workarounds fpr cordapp-configuration, network-verifier and simm-valuation-demo:
JarSigner rejects jars with duplicates inside, so remove them.
* Upgrade to Gradle plugin 4.0.32 and reenable CorDapp signing for samples.
This commit is contained in:
Florian Friemel 2018-10-15 21:11:52 +01:00 committed by Chris Rankin
parent 2248f54f9f
commit 47068e6b7a
17 changed files with 199 additions and 90 deletions

View File

@ -1,4 +1,4 @@
gradlePluginsVersion=4.0.29 gradlePluginsVersion=4.0.32
kotlinVersion=1.2.51 kotlinVersion=1.2.51
# ***************************************************************# # ***************************************************************#
# When incrementing platformVersion make sure to update # # When incrementing platformVersion make sure to update #

View File

@ -198,11 +198,23 @@ CorDapps can advertise their minimum and target platform version. The minimum pl
.. sourcecode:: groovy .. sourcecode:: groovy
'Min-Platform-Version': 3 'Min-Platform-Version': 4
'Target-Platform-Version': 4 'Target-Platform-Version': 4
Using the `cordapp` Gradle plugin, this can be achieved by putting this in your CorDapp's `build.gradle`:
In gradle, this can be achieved by modifying the jar task as shown in this example: .. container:: codeset
.. sourcecode:: groovy
cordapp {
info {
targetPlatformVersion 4
minimumPlatformVersion 4
}
}
Without using the `cordapp` plugin, you can achieve the same by modifying the jar task as shown in this example:
.. container:: codeset .. container:: codeset
@ -211,7 +223,7 @@ In gradle, this can be achieved by modifying the jar task as shown in this examp
jar { jar {
manifest { manifest {
attributes( attributes(
'Min-Platform-Version': 3 'Min-Platform-Version': 4
'Target-Platform-Version': 4 'Target-Platform-Version': 4
) )
} }

View File

@ -33,3 +33,13 @@ idea {
publish { publish {
name 'corda-notary-bft-smart' name 'corda-notary-bft-smart'
} }
cordapp {
info {
name "net/corda/experimental/notary-bft-smart"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -33,3 +33,12 @@ idea {
publish { publish {
name 'corda-notary-raft' name 'corda-notary-raft'
} }
cordapp {
info {
name "net/corda/experimental/notary-raft"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -87,6 +87,8 @@ cordapp {
info { info {
name "net/corda/finance" name "net/corda/finance"
vendor "Corda Open Source" vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
} }
} }

View File

@ -1,11 +1,8 @@
apply plugin: 'java'
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'idea' apply plugin: 'idea'
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.cordapp' apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation' apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'maven-publish'
sourceSets { sourceSets {
integrationTest { integrationTest {
@ -27,14 +24,16 @@ dependencies {
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"
// Corda integration dependencies // Corda integration dependencies
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaCompile project(':core') cordaCompile project(':core')
cordaCompile project(':webserver') cordaCompile project(':webserver')
cordaCompile project(':node-driver') cordaCompile project(':node-driver')
} }
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["StartFlow.net.corda.attachmentdemo.AttachmentDemoFlow", ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["StartFlow.net.corda.attachmentdemo.AttachmentDemoFlow",
"InvokeRpc.wellKnownPartyFromX500Name", "InvokeRpc.wellKnownPartyFromX500Name",
"InvokeRpc.attachmentExists", "InvokeRpc.attachmentExists",
@ -92,18 +91,6 @@ idea {
} }
} }
publishing {
publications {
jarAndSources(MavenPublication) {
from components.java
artifactId 'attachmentdemo'
artifact sourceJar
artifact javadocJar
}
}
}
task runSender(type: JavaExec) { task runSender(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.attachmentdemo.AttachmentDemoKt' main = 'net.corda.attachmentdemo.AttachmentDemoKt'
@ -125,3 +112,12 @@ jar {
) )
} }
} }
cordapp {
info {
name "net/corda/samples/attachment-demo"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -2,10 +2,8 @@ apply plugin: 'java'
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'idea' apply plugin: 'idea'
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.cordapp' apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation' apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'maven-publish'
dependencies { dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
@ -14,8 +12,8 @@ dependencies {
cordapp project(':finance') cordapp project(':finance')
// Corda integration dependencies // Corda integration dependencies
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaCompile project(':core') cordaCompile project(':core')
cordaCompile project(':client:jfx') cordaCompile project(':client:jfx')
cordaCompile project(':client:rpc') cordaCompile project(':client:rpc')
@ -32,7 +30,9 @@ dependencies {
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"
} }
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
nodeDefaults { nodeDefaults {
cordapp project(':finance') cordapp project(':finance')
} }
@ -82,18 +82,6 @@ idea {
} }
} }
publishing {
publications {
jarAndSources(MavenPublication) {
from components.java
artifactId 'bankofcorda'
artifact sourceJar
artifact javadocJar
}
}
}
task runRPCCashIssue(type: JavaExec) { task runRPCCashIssue(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.bank.IssueCash' main = 'net.corda.bank.IssueCash'
@ -123,3 +111,12 @@ jar {
) )
} }
} }
cordapp {
info {
name "net/corda/samples/bank-of-corda-demo"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -1,17 +1,20 @@
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'java' apply plugin: 'idea'
apply plugin: 'net.corda.plugins.cordapp' apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation' apply plugin: 'net.corda.plugins.cordformation'
dependencies { dependencies {
cordaCompile project(":core") cordaCompile project(':core')
cordaCompile project(":node-api") cordaCompile project(':node-api')
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version" runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
// Corda integration dependencies
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
} }
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
directory file("$buildDir/nodes") directory file("$buildDir/nodes")
nodeDefaults { nodeDefaults {
cordapps = [] cordapps = []
@ -25,7 +28,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
port 10003 port 10003
adminPort 10004 adminPort 10004
} }
rpcUsers = []
extraConfig = ['h2Settings.address' : 'localhost:10005'] extraConfig = ['h2Settings.address' : 'localhost:10005']
} }
node { node {
@ -55,3 +57,12 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
extraConfig = ['h2Settings.address' : 'localhost:10013'] extraConfig = ['h2Settings.address' : 'localhost:10013']
} }
} }
cordapp {
info {
name "net/corda/samples/cordapp-configuration"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -1,8 +1,14 @@
package net.corda.configsample package net.corda.configsample
import co.paralleluniverse.fibers.Suspendable import co.paralleluniverse.fibers.Suspendable
import net.corda.core.contracts.CommandData
import net.corda.core.contracts.Contract
import net.corda.core.contracts.ContractState
import net.corda.core.flows.FlowLogic import net.corda.core.flows.FlowLogic
import net.corda.core.flows.StartableByRPC import net.corda.core.flows.StartableByRPC
import net.corda.core.identity.AbstractParty
import net.corda.core.serialization.CordaSerializable
import net.corda.core.transactions.LedgerTransaction
import net.corda.core.utilities.ProgressTracker import net.corda.core.utilities.ProgressTracker
@StartableByRPC @StartableByRPC
@ -17,3 +23,22 @@ class GetStringConfigFlow(private val configKey: String) : FlowLogic<String>() {
return config.getString(configKey) return config.getString(configKey)
} }
} }
@CordaSerializable
data class GetStringTestState(val responses: List<String>, val issuer: AbstractParty) : ContractState {
override val participants: List<AbstractParty>
get() = listOf(issuer)
}
@CordaSerializable
object GetStringTestCommand : CommandData
class GetStringTestContract : Contract {
override fun verify(tx: LedgerTransaction) {
}
}

View File

@ -21,7 +21,6 @@ ext['jackson.version'] = "$jackson_version"
ext['dropwizard-metrics.version'] = "$metrics_version" ext['dropwizard-metrics.version'] = "$metrics_version"
ext['mockito.version'] = "$mockito_version" ext['mockito.version'] = "$mockito_version"
apply plugin: 'java'
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'org.springframework.boot' apply plugin: 'org.springframework.boot'

View File

@ -1,11 +1,8 @@
apply plugin: 'java'
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'idea' apply plugin: 'idea'
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.cordformation' apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'net.corda.plugins.cordapp' apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'maven-publish'
apply plugin: 'application' apply plugin: 'application'
mainClassName = 'net.corda.irs.IRSDemo' mainClassName = 'net.corda.irs.IRSDemo'
@ -31,7 +28,7 @@ dependencies {
cordapp project(':finance') cordapp project(':finance')
// Corda integration dependencies // Corda integration dependencies
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(':core') cordaCompile project(':core')
// Cordapp dependencies // Cordapp dependencies
@ -57,7 +54,8 @@ def rpcUsersList = [
]] ]]
] ]
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { def nodeTask = tasks.getByPath(':node:capsule:assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask]) {
node { node {
name "O=Notary Service,L=Zurich,C=CH" name "O=Notary Service,L=Zurich,C=CH"
@ -112,7 +110,7 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
} }
task prepareDockerNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar']) { task prepareDockerNodes(type: net.corda.plugins.Dockerform, dependsOn: ['jar', nodeTask]) {
node { node {
name "O=Notary Service,L=Zurich,C=CH" name "O=Notary Service,L=Zurich,C=CH"
@ -159,15 +157,25 @@ tasks.withType(CreateStartScripts).each { task ->
idea { idea {
module { module {
downloadJavadoc = true // defaults to false downloadJavadoc = true
downloadSources = true downloadSources = true
} }
} }
jar { jar {
from sourceSets.test.output from sourceSets.test.output
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
} }
artifacts { artifacts {
demoArtifacts jar demoArtifacts jar
} }
cordapp {
info {
name "net/corda/irs-demo"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -1,18 +1,20 @@
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'java'
apply plugin: 'net.corda.plugins.cordapp' apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation' apply plugin: 'net.corda.plugins.cordformation'
dependencies { dependencies {
cordaCompile project(":core") cordaCompile project(':core')
cordaCompile project(":node-api") cordaCompile project(':node-api')
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts')
testCompile project(":test-utils") testCompile project(":test-utils")
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"
// Corda integration dependencies
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
} }
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { def nodeTask = tasks.getByPath(':node:capsule:assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask]) {
ext.rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]] ext.rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]]
directory "./build/nodes" directory "./build/nodes"
@ -49,3 +51,12 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
extraConfig = ['h2Settings.address' : 'localhost:0'] extraConfig = ['h2Settings.address' : 'localhost:0']
} }
} }
cordapp {
info {
name "net/corda/samples/network-verifier"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -16,8 +16,8 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// Corda integration dependencies // Corda integration dependencies
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaCompile project(':core') cordaCompile project(':core')
cordaCompile project(':client:jfx') cordaCompile project(':client:jfx')
cordaCompile project(':client:rpc') cordaCompile project(':client:rpc')
@ -28,9 +28,12 @@ dependencies {
cordapp project(':experimental:notary-bft-smart') cordapp project(':experimental:notary-bft-smart')
} }
def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
task deployNodes(dependsOn: ['deployNodesSingle', 'deployNodesRaft', 'deployNodesBFT', 'deployNodesCustom']) task deployNodes(dependsOn: ['deployNodesSingle', 'deployNodesRaft', 'deployNodesBFT', 'deployNodesCustom'])
task deployNodesSingle(type: Cordform, dependsOn: 'jar') { task deployNodesSingle(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
directory file("$buildDir/nodes/nodesSingle") directory file("$buildDir/nodes/nodesSingle")
nodeDefaults { nodeDefaults {
extraConfig = [h2Settings: [address: "localhost:0"]] extraConfig = [h2Settings: [address: "localhost:0"]]
@ -55,7 +58,7 @@ task deployNodesSingle(type: Cordform, dependsOn: 'jar') {
} }
} }
task deployNodesCustom(type: Cordform, dependsOn: 'jar') { task deployNodesCustom(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
directory file("$buildDir/nodes/nodesCustom") directory file("$buildDir/nodes/nodesCustom")
nodeDefaults { nodeDefaults {
extraConfig = [h2Settings: [address: "localhost:0"]] extraConfig = [h2Settings: [address: "localhost:0"]]
@ -83,7 +86,7 @@ task deployNodesCustom(type: Cordform, dependsOn: 'jar') {
} }
} }
task deployNodesRaft(type: Cordform, dependsOn: 'jar') { task deployNodesRaft(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
def className = "net.corda.notary.raft.RaftNotaryService" def className = "net.corda.notary.raft.RaftNotaryService"
directory file("$buildDir/nodes/nodesRaft") directory file("$buildDir/nodes/nodesRaft")
nodeDefaults { nodeDefaults {
@ -151,7 +154,7 @@ task deployNodesRaft(type: Cordform, dependsOn: 'jar') {
} }
} }
task deployNodesBFT(type: Cordform, dependsOn: 'jar') { task deployNodesBFT(type: Cordform, dependsOn: ['jar', nodeTask, webTask]) {
def clusterAddresses = ["localhost:11000", "localhost:11010", "localhost:11020", "localhost:11030"] def clusterAddresses = ["localhost:11000", "localhost:11010", "localhost:11020", "localhost:11030"]
def className = "net.corda.notary.bftsmart.BftSmartNotaryService" def className = "net.corda.notary.bftsmart.BftSmartNotaryService"
directory file("$buildDir/nodes/nodesBFT") directory file("$buildDir/nodes/nodesBFT")
@ -250,3 +253,12 @@ jar {
) )
} }
} }
cordapp {
info {
name "net/corda/samples/notary-demo"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}

View File

@ -4,7 +4,6 @@ allprojects {
} }
} }
apply plugin: 'java'
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'net.corda.plugins.quasar-utils' apply plugin: 'net.corda.plugins.quasar-utils'
@ -27,7 +26,7 @@ configurations {
} }
dependencies { dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" cordaCompile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// The SIMM demo CorDapp depends upon Cash CorDapp features // The SIMM demo CorDapp depends upon Cash CorDapp features
cordapp project(':finance') cordapp project(':finance')
@ -62,7 +61,9 @@ dependencies {
testCompile "org.assertj:assertj-core:$assertj_version" testCompile "org.assertj:assertj-core:$assertj_version"
} }
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
directory file("$buildDir/nodes") directory file("$buildDir/nodes")
nodeDefaults { nodeDefaults {
cordapp project(':finance') cordapp project(':finance')
@ -70,6 +71,9 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
cordapp project(':samples:simm-valuation-demo:flows') cordapp project(':samples:simm-valuation-demo:flows')
rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]] rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]]
} }
signing {
enabled false
}
node { node {
name "O=Notary Service,L=Zurich,C=CH" name "O=Notary Service,L=Zurich,C=CH"
notary = [validating : true] notary = [validating : true]
@ -137,3 +141,10 @@ task integrationTest(type: Test, dependsOn: []) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath classpath = sourceSets.integrationTest.runtimeClasspath
} }
cordapp {
info {
vendor = 'R3'
targetPlatformVersion = corda_platform_version.toInteger()
}
}

View File

@ -6,6 +6,12 @@ def shrinkJar = file("$buildDir/libs/${project.name}-${project.version}-tiny.jar
cordapp { cordapp {
info { info {
vendor = 'R3' vendor = 'R3'
targetPlatformVersion = corda_platform_version.toInteger()
}
signing {
// We need to sign the output of the "shrink" task,
// but the jar signer doesn't support that yet.
enabled false
} }
} }

View File

@ -4,6 +4,10 @@ apply plugin: 'net.corda.plugins.cordapp'
cordapp { cordapp {
info { info {
vendor = 'R3' vendor = 'R3'
targetPlatformVersion = corda_platform_version.toInteger()
}
signing {
enabled false
} }
} }

View File

@ -1,11 +1,8 @@
apply plugin: 'java'
apply plugin: 'kotlin' apply plugin: 'kotlin'
apply plugin: 'idea' apply plugin: 'idea'
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.cordapp' apply plugin: 'net.corda.plugins.cordapp'
apply plugin: 'net.corda.plugins.cordformation' apply plugin: 'net.corda.plugins.cordformation'
apply plugin: 'maven-publish'
sourceSets { sourceSets {
integrationTest { integrationTest {
@ -29,8 +26,8 @@ dependencies {
cordapp project(':finance') cordapp project(':finance')
// Corda integration dependencies // Corda integration dependencies
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts') cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaCompile project(':core') cordaCompile project(':core')
// Corda Plugins: dependent flows and services // Corda Plugins: dependent flows and services
@ -41,7 +38,9 @@ dependencies {
testCompile "org.assertj:assertj-core:${assertj_version}" testCompile "org.assertj:assertj-core:${assertj_version}"
} }
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) { def nodeTask = tasks.getByPath(':node:capsule:assemble')
def webTask = tasks.getByPath(':webserver:webcapsule:assemble')
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask, webTask]) {
ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["ALL"]]] ext.rpcUsers = [['username': "demo", 'password': "demo", 'permissions': ["ALL"]]]
directory "./build/nodes" directory "./build/nodes"
@ -104,18 +103,6 @@ idea {
} }
} }
publishing {
publications {
jarAndSources(MavenPublication) {
from components.java
artifactId 'traderdemo'
artifact sourceJar
artifact javadocJar
}
}
}
task runBank(type: JavaExec) { task runBank(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath classpath = sourceSets.main.runtimeClasspath
main = 'net.corda.traderdemo.TraderDemoKt' main = 'net.corda.traderdemo.TraderDemoKt'
@ -137,3 +124,12 @@ jar {
) )
} }
} }
cordapp {
info {
name "net/corda/samples/trader-demo"
vendor "Corda Open Source"
targetPlatformVersion corda_platform_version.toInteger()
minimumPlatformVersion 1
}
}