Reputation: 42229
I'm performing this on Windows, so some of these operations might be different for Linux/Mac users.
Step 1: Clone the Corda V3 Kotlin template into a new folder
git clone https://github.com/corda/cordapp-template-kotlin.git MyFirstCorDapp
Step 2: clean and deploy nodes with gradle
./gradlew clean dN
This image illustrates the JAR files that have been built and deployed into a cordapp folder for a node
deployNodes
produce MyFirstCorDapp-0.1.jar
? This file
doesn't seem necessary.cordapp-contracts-states-0.1.jar
so big? Given that this
was compiled directly from the kotlin template with no changes, I'd
expect this to be much smaller.Upvotes: 2
Views: 114
Reputation: 8116
The reason why MyFirstCordapp-0.1.jar is appearing is because of this line:
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
The root project has a kotlin plugin so creates a jar so the deployNodes deploys it.
One solution would be to use a subprojects closure to skip the root project
task deployNodes(type: net.corda.plugins.Cordform) {
subprojects.each { subproject ->
dependsOn(
subproject.tasks.matching { task ->
(task.name == 'jar')
}
)
}
The reason why cordapp-contracts-states-0.1.jar is "so big" (775 KB) is because the corda gradle plugin packs some dependencies in it.
Upvotes: 4