Skip to content

Commit

Permalink
Changed dependencies of deployNodes everywhere to depend on the jar t…
Browse files Browse the repository at this point in the history
…ask and not build to reduce build time. (corda#502)
  • Loading branch information
Clintonio authored Apr 4, 2017
1 parent a93692e commit b5c6f60
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ dependencies {
compile project(':node')
compile "com.google.guava:guava:$guava_version"

runtime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
runtime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
// Set to compile to ensure it exists now deploy nodes no longer relies on build
compile project(path: ":node:capsule", configuration: 'runtimeArtifacts')
compile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')

// For the buildCordappDependenciesJar task
runtime project(':client:jfx')
Expand Down Expand Up @@ -173,7 +174,7 @@ tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
networkMap "Controller"
node {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/creating-a-cordapp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ is a three node example;

.. code-block:: text
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes" // The output directory
networkMap "Controller" // The artemis address of the node named here will be used as the networkMapService.address on all other nodes.
node {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/example-code/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ task integrationTest(type: Test) {
classpath = sourceSets.integrationTest.runtimeClasspath
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
networkMap "Notary"
node {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/tutorial-cordapp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ like to deploy for testing. See further details below:

.. sourcecode:: groovy

task deployNodes(type: com.r3corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: com.r3corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./kotlin-source/build/nodes" // The output directory.
networkMap "Controller" // The artemis address of the node to be used as the network map.
node {
Expand Down
2 changes: 1 addition & 1 deletion samples/attachment-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
}
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
ext.rpcUsers = [ ['user' : "demo", 'password' : "demo", 'permissions' : ["StartFlow.net.corda.flows.FinalityFlow"]] ]

directory "./build/nodes"
Expand Down
2 changes: 1 addition & 1 deletion samples/bank-of-corda-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
// This name "Notary" is hard-coded into BankOfCordaClientApi so if you change it here, change it there too.
// In this demo the node that runs a standalone notary also acts as the network map server.
Expand Down
2 changes: 1 addition & 1 deletion samples/irs-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ dependencies {
compile "com.squareup.okhttp3:okhttp:$okhttp_version"
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
networkMap "Notary"
node {
Expand Down
2 changes: 1 addition & 1 deletion samples/raft-notary-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ task generateNotaryIdentity(type: JavaExec) {
args = [nodeDirs, notaryType, notaryName]
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build', 'generateNotaryIdentity']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', 'generateNotaryIdentity']) {
directory deployTo
networkMap "Notary 1"
node {
Expand Down
2 changes: 1 addition & 1 deletion samples/simm-valuation-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies {
compile "com.opengamma.strata:strata-math:${strata_version}"
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
directory "./build/nodes"
networkMap "Controller"
node {
Expand Down
2 changes: 1 addition & 1 deletion samples/trader-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {
// Specify your cordapp's dependencies below, including dependent cordapps
}

task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['build']) {
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
ext.rpcUsers = [['user': "demo", 'password': "demo", 'permissions': [
'StartFlow.net.corda.flows.IssuerFlow$IssuanceRequester',
"StartFlow.net.corda.traderdemo.flow.SellerFlow"
Expand Down

0 comments on commit b5c6f60

Please sign in to comment.