Installing the CorDapp Template
This section describes how to install the CorDapp template. It contains the following:
cordapp-template-kotlin
repository in IntelliJ. If you are working with the cordapp-template-java
repository, it looks very similar but the flow code is in a java
folder and the flow code is saved in more source files. For more information, see Java Flow Code.Downloading
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>
Browse to the new folder and checkout the 5.2 branch:
git checkout release-V5.2
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.Open the project in IntelliJ and let the import process complete. When complete, the project structure looks as follows:
Configuring
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:
Corda Version
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
Java Version
The Corda runtime Gradle tasks require Java Azul Zulu 17. To configure IntelliJ to use the correct Java version for Gradle:
Set Gradle JVM to Project SDK 17, via File > Settings > Build, Execution, Deployment > Build Tools > Gradle.
Update the Java version in 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.