Initial setup

Learning Objectives

After you have completed this tutorial, you will know how to create two modules containing the required setup to build your CorDapp. You will create the following modules:

  • ledger-utxo-example-apples-app - This is where you will write your application logic.
  • ledger-utxo-example-apples-contract - This is where your object definitions will be placed.

Perform Initial Setup of Your CorDapp

Create two modules in the project’s root directory.

  1. Create the ledger-utxo-example-apples-app module by performing the following steps:

a. Include the following build.gradle:

plugins {
    id 'net.corda.plugins.cordapp-cpb2' version '7.0.1-Gecko'
}

cordapp {
    targetPlatformVersion 999
    minimumPlatformVersion 999
    workflow {
        name "Apples utxo example app"
        versionId 1
        vendor "R3"
    }
}

dependencies {
    cordaProvided 'net.corda:corda-ledger-utxo:5.0.0.523-Gecko1.0'

    cordapp project(':testing:cpbs:ledger-apples-example:ledger-utxo-apples-example-contract')

    // Common and API packages pulled in as transitive dependencies through client
    cordapp 'com.r3.corda.notary.plugin.nonvalidating:notary-plugin-non-validating-client:5.0.0.0-Gecko1.0'
}

b. Create the net.cordapp.utxo.apples.flows package.

  1. Create the ledger-utxo-example-apples-contract module by performing the following steps:

a. Include the following build.gradle:

plugins {
    id 'net.corda.plugins.cordapp-cpb2' version '7.0.1-Gecko'
}

cordapp {
    targetPlatformVersion 999
    minimumPlatformVersion 999
    contract {
        name "Apples utxo example contract"
        versionId 1
        vendor "R3"
    }
}

dependencies {
    cordaProvided 'net.corda:corda-ledger-utxo:5.0.0.523-Gecko1.0'
}

b. Create two packages: net.cordapp.utxo.apples.contracts and net.cordapp.utxo.apples.states.

Next steps

Follow the Write States tutorial to continue on this learning path.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.