hyperledger-web3j / web3j-solidity-gradle-plugin

Gradle plugin providing tasks to compile Solidity contracts.
Apache License 2.0
21 stars 25 forks source link

Could not resolve all artifacts for configuration ':classpath'. #22

Open magooster opened 4 years ago

magooster commented 4 years ago

If I use the version from the readme I get the following error

A problem occurred configuring root project 'sample-project'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find com.github.h0tk3y.betterParse:better-parse-jvm:0.4.0-alpha-3.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/github/h0tk3y/betterParse/better-parse-jvm/0.4.0-alpha-3/better-parse-jvm-0.4.0-alpha-3.pom
       - https://repo.maven.apache.org/maven2/com/github/h0tk3y/betterParse/better-parse-jvm/0.4.0-alpha-3/better-parse-jvm-0.4.0-alpha-3.jar
       - https://plugins.gradle.org/m2/com/github/h0tk3y/betterParse/better-parse-jvm/0.4.0-alpha-3/better-parse-jvm-0.4.0-alpha-3.pom
     Required by:
         project : > org.web3j.solidity:org.web3j.solidity.gradle.plugin:0.2.0 > gradle.plugin.org.web3j.solidity:solidity-gradle-plugin:0.2.0 > org.web3j:web3j-sokt:0.2.0

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
magooster commented 4 years ago

To resolve I had to add the following to settings.gradle

pluginManagement {
    repositories {
        mavenCentral()
        gradlePluginPortal()
        maven {
            url 'https://dl.bintray.com/hotkeytlt/maven'
        }
    }
}
xaviarias commented 4 years ago

The Sokt library depends on better-parse-jvm, the repository should be added automatically.