mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
CORDA-2361: Split samples into contracts and workflows (#4575)
This commit is contained in:
committed by
GitHub
parent
82f5a756fe
commit
35acbc8107
@ -1,24 +1,8 @@
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'net.corda.plugins.quasar-utils'
|
||||
apply plugin: 'net.corda.plugins.cordapp'
|
||||
apply plugin: 'net.corda.plugins.cordformation'
|
||||
|
||||
sourceSets {
|
||||
integrationTest {
|
||||
kotlin {
|
||||
compileClasspath += main.output + test.output
|
||||
runtimeClasspath += main.output + test.output
|
||||
srcDir file('src/integration-test/kotlin')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
integrationTestCompile.extendsFrom testCompile
|
||||
integrationTestRuntime.extendsFrom testRuntime
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
||||
@ -27,11 +11,11 @@ dependencies {
|
||||
cordapp project(':finance:workflows')
|
||||
cordapp project(':confidential-identities')
|
||||
cordapp project(':samples:bank-of-corda-demo')
|
||||
cordapp project(':samples:trader-demo:workflows-trader')
|
||||
|
||||
// Corda integration dependencies
|
||||
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
|
||||
cordaCompile project(':core')
|
||||
|
||||
testCompile project(':test-utils')
|
||||
testCompile "junit:junit:$junit_version"
|
||||
@ -43,9 +27,13 @@ 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"]]]
|
||||
nodeDefaults {
|
||||
projectCordapp {
|
||||
deploy = false // TODO This is a bug, project cordapp should be disabled if no cordapp plugin is applied.
|
||||
}
|
||||
cordapp project(':finance:workflows')
|
||||
cordapp project(':finance:contracts')
|
||||
cordapp project(':confidential-identities')
|
||||
cordapp project(':samples:trader-demo:workflows-trader')
|
||||
}
|
||||
directory "./build/nodes"
|
||||
node {
|
||||
@ -103,11 +91,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask,
|
||||
}
|
||||
}
|
||||
|
||||
task integrationTest(type: Test, dependsOn: []) {
|
||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
}
|
||||
|
||||
idea {
|
||||
module {
|
||||
downloadJavadoc = true // defaults to false
|
||||
@ -128,22 +111,3 @@ task runSeller(type: JavaExec) {
|
||||
args '--role'
|
||||
args 'SELLER'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
'Automatic-Module-Name': 'net.corda.samples.demos.trader'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
cordapp {
|
||||
targetPlatformVersion corda_platform_version.toInteger()
|
||||
minimumPlatformVersion 1
|
||||
workflow {
|
||||
name "net/corda/samples/trader-demo"
|
||||
versionId 1
|
||||
vendor "R3"
|
||||
licence "Open Source (Apache 2)"
|
||||
}
|
||||
}
|
||||
|
59
samples/trader-demo/workflows-trader/build.gradle
Normal file
59
samples/trader-demo/workflows-trader/build.gradle
Normal file
@ -0,0 +1,59 @@
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'net.corda.plugins.quasar-utils'
|
||||
apply plugin: 'net.corda.plugins.cordapp'
|
||||
|
||||
sourceSets {
|
||||
integrationTest {
|
||||
kotlin {
|
||||
compileClasspath += main.output + test.output
|
||||
runtimeClasspath += main.output + test.output
|
||||
srcDir file('src/integration-test/kotlin')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
integrationTestCompile.extendsFrom testCompile
|
||||
integrationTestRuntime.extendsFrom testRuntime
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
||||
// The trader demo CorDapp depends upon Cash CorDapp features
|
||||
cordapp project(':finance:contracts')
|
||||
cordapp project(':finance:workflows')
|
||||
cordapp project(':confidential-identities')
|
||||
cordapp project(':samples:bank-of-corda-demo')
|
||||
|
||||
// Corda integration dependencies
|
||||
cordaCompile project(':core')
|
||||
|
||||
testCompile project(':test-utils')
|
||||
testCompile "junit:junit:$junit_version"
|
||||
testCompile "org.assertj:assertj-core:${assertj_version}"
|
||||
|
||||
integrationTestCompile project(':finance:workflows')
|
||||
integrationTestCompile project(':finance:contracts')
|
||||
}
|
||||
|
||||
task integrationTest(type: Test, dependsOn: []) {
|
||||
testClassesDirs = sourceSets.integrationTest.output.classesDirs
|
||||
classpath = sourceSets.integrationTest.runtimeClasspath
|
||||
}
|
||||
|
||||
jar {
|
||||
baseName 'corda-trader-demo-workflows'
|
||||
}
|
||||
|
||||
cordapp {
|
||||
targetPlatformVersion corda_platform_version.toInteger()
|
||||
minimumPlatformVersion 1
|
||||
workflow {
|
||||
name "Trader Demo"
|
||||
versionId 1
|
||||
vendor "R3"
|
||||
licence "Open Source (Apache 2)"
|
||||
}
|
||||
}
|
@ -14,7 +14,6 @@ import net.corda.testing.driver.DriverParameters
|
||||
import net.corda.testing.driver.InProcess
|
||||
import net.corda.testing.driver.OutOfProcess
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.node.NotarySpec
|
||||
import net.corda.testing.node.TestCordapp
|
||||
import net.corda.testing.node.User
|
||||
import net.corda.testing.node.internal.FINANCE_CORDAPPS
|
Reference in New Issue
Block a user