Joel
Joel

Reputation: 23140

Could not find method cordaCompile() when upgrading to Corda 3.0

I am upgrading my CorDapp to Corda 3.0. When I run the build process, I get the following error:

Could not find method cordaCompile() for arguments [net.corda:corda-core:corda-3.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

How can I address this issue?

Upvotes: 1

Views: 698

Answers (1)

Joel
Joel

Reputation: 23140

You need to add the following dependency to the buildscript:

dependencies {
    ...
    classpath "net.corda.plugins:cordapp:$corda_gradle_plugins_version"
    ...
}

And apply the cordapp plugin:

apply plugin: 'net.corda.plugins.cordapp'

See the build.gradle file here: https://github.com/corda/cordapp-template-kotlin/blob/release-V3/build.gradle.

Upvotes: 2

Related Questions