Installing the CorDapp Template heading-link-icon

This section describes how to install the CorDapp template. It contains the following:

  1. To obtain the Corda 5.2 CorDapp template, clone the cordapp-template-kotlin repository or cordapp-template-java repository:

    git clone https://github.com/corda/cordapp-template-kotlin.git <local-folder>
    
    git clone https://github.com/corda/cordapp-template-java.git <local-folder>
    
  2. Browse to the new folder and checkout the 5.2 branch:

    git checkout release-V5.2
    
  3. Change the remote repository so that you do not inadvertently push your work back to the R3 repository:

    git remote remove origin
    git remote add origin <remote-url>
    

    where <remote-url> is the URL of your remote repository that you have created.

  4. Open the project in IntelliJ and let the import process complete. When complete, the project structure looks as follows:

    CorDapp template project in IntelliJ
    CorDapp template project

The CorDapp template includes Gradle tasks to manage a local deployment of Corda. This section describes how to configure Gradle for your installation and contains the following:

The gradle.properties file specifies the Corda version that the Gradle tasks use. Update the version by setting cordaNotaryPluginsVersion to the Corda version. For example, for Corda 5.2:

cordaNotaryPluginsVersion=5.2.0.0

The Corda runtime Gradle tasks require Java Azul Zulu 17. To configure IntelliJ to use the correct Java version for Gradle:

  1. Set Gradle JVM to Project SDK 17, via File > Settings > Build, Execution, Deployment > Build Tools > Gradle.

    JVM version in IntelliJ for CorDapp template project
    Gradle Java version
  2. Update the Java version in the build.gradle file:

    Corda runtime Gradle build gradle block in IntelliJ for CorDapp template project
    Configure the Corda runtime Gradle plugin via the build.gradle file

If using IntelliJ IDEA version 2023.1.4 or greater, you should instead set the environmental variable JAVA_HOME to point to your installation of Java Azul Zulu 17.

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.