mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
Fixed review issues.
This commit is contained in:
parent
5d894138c2
commit
1754493490
@ -106,23 +106,6 @@ root directory of Corda
|
||||
This will publish corda-$version.jar, contracts-$version.jar, core-$version.jar and node-$version.jar to the
|
||||
group com.r3corda. You can now depend on these as you normally would a Maven dependency.
|
||||
|
||||
In Gradle you can depend on these by adding/modifying your build.gradle file to contain the following:
|
||||
|
||||
.. code-block:: groovy
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
... other repositories here ...
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.r3corda:core:$corda_version"
|
||||
compile "com.r3corda:contracts:$corda_version"
|
||||
compile "com.r3corda:node:$corda_version"
|
||||
compile "com.r3corda:corda:$corda_version"
|
||||
... other dependencies here ...
|
||||
}
|
||||
|
||||
Gradle Plugins for Cordapps
|
||||
===========================
|
||||
|
||||
@ -147,24 +130,102 @@ Using Gradle Plugins
|
||||
To use the plugins, if you are not already using the Cordapp template project, you must modify your build.gradle. Add
|
||||
the following segments to the relevant part of your build.gradle.
|
||||
|
||||
.. code-block::
|
||||
Template Build.gradle
|
||||
=====================
|
||||
|
||||
To build against Corda and the plugins that cordapps use, update your build.gradle to contain the following:
|
||||
|
||||
.. code-block:: groovy
|
||||
|
||||
buildscript {
|
||||
ext.corda_version = '<enter the corda version you build against here>'
|
||||
... (your buildscript)
|
||||
... your buildscript ...
|
||||
|
||||
repositories {
|
||||
... (other repositories)
|
||||
... other repositories ...
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
... (your dependencies)
|
||||
classpath "com.r3corda.plugins:<plugin-maven-name>:$corda_version"
|
||||
... your dependencies ...
|
||||
classpath "com.r3corda.plugins:cordformation:$corda_version"
|
||||
classpath "com.r3corda.plugins:quasar-utils:$corda_version"
|
||||
classpath "com.r3corda.plugins:publish-utils:$corda_version"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.r3corda.plugins.<plugin-maven-name>'
|
||||
apply plugin: 'com.r3corda.plugins.cordformation'
|
||||
apply plugin: 'com.r3corda.plugins.quasar-utils'
|
||||
apply plugin: 'com.r3corda.plugins.publish-utils'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
... other repositories here ...
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "com.r3corda:core:$corda_version"
|
||||
compile "com.r3corda:contracts:$corda_version"
|
||||
compile "com.r3corda:node:$corda_version"
|
||||
compile "com.r3corda:corda:$corda_version"
|
||||
... other dependencies here ...
|
||||
}
|
||||
|
||||
.. code-block::
|
||||
|
||||
...
|
||||
|
||||
Cordformation
|
||||
=============
|
||||
|
||||
Cordformation is the local node deployment system for Cordapps, the nodes generated are intended to be used for
|
||||
experimenting, debugging, and testing node configurations and setups but not intended for production or testnet
|
||||
deployment.
|
||||
|
||||
To use this plugin you must add a new task that is of the type `com.r3corda.plugins.Cordform` and then configure
|
||||
the nodes you wish to deploy with the Node and nodes configuration DSL. This DSL is specified in the
|
||||
`JavaDoc <api/index.html>`_. An example of this is in the template-cordapp and below is a three node example;
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
task deployNodes(type: com.r3corda.plugins.Cordform, dependsOn: ['build']) {
|
||||
directory "./build/nodes" // The output directory
|
||||
networkMap "Notary" // The artemis address of the node named here will be used as the networkMapAddress on all other nodes.
|
||||
node {
|
||||
name "Notary"
|
||||
dirName "notary"
|
||||
nearestCity "London"
|
||||
notary true // Sets this node to be a notary
|
||||
advertisedServices = []
|
||||
artemisPort 12345
|
||||
webPort 12346
|
||||
cordapps = []
|
||||
}
|
||||
node {
|
||||
name "NodeA"
|
||||
dirName "nodea"
|
||||
nearestCity "London"
|
||||
advertisedServices = []
|
||||
artemisPort 31337
|
||||
webPort 31339
|
||||
cordapps = []
|
||||
}
|
||||
node {
|
||||
name "NodeB"
|
||||
dirName "nodeb"
|
||||
nearestCity "New York"
|
||||
advertisedServices = []
|
||||
artemisPort 31338
|
||||
webPort 31340
|
||||
cordapps = []
|
||||
}
|
||||
}
|
||||
|
||||
You can create more configurations with new tasks that extend Cordform.
|
||||
|
||||
New nodes can be added by simply adding another node block and giving it a different name, directory and ports. When you
|
||||
run this task it will install the nodes to the directory specified and a script will be generated (for UNIX users only
|
||||
at present) to run the nodes with one command.
|
||||
|
||||
Other cordapps can also be specified if they are already specified as classpath or compile dependencies in your
|
||||
build.gradle.
|
@ -1,58 +1 @@
|
||||
Cordformation
|
||||
=============
|
||||
|
||||
Plugin Maven Name::
|
||||
|
||||
cordformation
|
||||
|
||||
Cordformation is the local node deployment system for Cordapps, the nodes generated are intended to be used for
|
||||
experimenting, debugging, and testing node configurations and setups but not intended for production or testnet
|
||||
deployment.
|
||||
|
||||
To use this plugin you must add a new task that is of the type `com.r3corda.plugins.Cordform` and then configure
|
||||
the nodes you wish to deploy with the Node and nodes configuration DSL. This DSL is specified in the JavaDoc but
|
||||
an example of this is in the template-cordapp and below is a three node example;
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
task deployNodes(type: com.r3corda.plugins.Cordform, dependsOn: ['build']) {
|
||||
directory "./build/nodes" // The output directory
|
||||
networkMap "Notary" // The artemis address of the node named here will be used as the networkMapAddress on all other nodes.
|
||||
node {
|
||||
name "Notary"
|
||||
dirName "notary"
|
||||
nearestCity "London"
|
||||
notary true // Sets this node to be a notary
|
||||
advertisedServices = []
|
||||
artemisPort 12345
|
||||
webPort 12346
|
||||
cordapps = []
|
||||
}
|
||||
node {
|
||||
name "NodeA"
|
||||
dirName "nodea"
|
||||
nearestCity "London"
|
||||
advertisedServices = []
|
||||
artemisPort 31337
|
||||
webPort 31339
|
||||
cordapps = []
|
||||
}
|
||||
node {
|
||||
name "NodeB"
|
||||
dirName "nodeb"
|
||||
nearestCity "New York"
|
||||
advertisedServices = []
|
||||
artemisPort 31338
|
||||
webPort 31340
|
||||
cordapps = []
|
||||
}
|
||||
}
|
||||
|
||||
You can create more configurations with new tasks that extend Cordform.
|
||||
|
||||
New nodes can be added by simply adding another node block and giving it a different name, directory and ports. When you
|
||||
run this task it will install the nodes to the directory specified and a script will be generated (for UNIX users only
|
||||
at present) to run the nodes with one command.
|
||||
|
||||
Other cordapps can also be specified if they are already specified as classpath or compile dependencies in your
|
||||
build.gradle.
|
||||
Please refer to the documentation in <corda-root>/doc/build/html/creating-a-cordapp.html#cordformation.
|
@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# Will attempt to execute a corda node within all subdirectories in the current working directory.
|
||||
# TODO: Use screens or separate windows when starting instances.
|
||||
|
||||
set -euo pipefail
|
||||
trap 'kill $(jobs -p)' SIGINT SIGTERM EXIT
|
||||
trap 'kill $(jobs -p)' EXIT
|
||||
export CAPSULE_CACHE_DIR=cache
|
||||
|
||||
function runNode {
|
||||
|
@ -1,10 +1,6 @@
|
||||
Publish Utils
|
||||
=============
|
||||
|
||||
Plugin Maven Name::
|
||||
|
||||
publish-utils
|
||||
|
||||
Publishing utilities adds a couple of tasks to any project it is applied to that hide some boilerplate that would
|
||||
otherwise be placed in the Cordapp template's build.gradle.
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
Quasar Utils
|
||||
============
|
||||
|
||||
|
||||
Plugin Maven Name::
|
||||
|
||||
quasar-utils
|
||||
|
||||
Quasar utilities adds several tasks and configuration that provide a default Quasar setup and removes some boilerplate.
|
||||
One line must be added to your build.gradle once you apply this plugin:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user