Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle compileSolidity error #36

Closed
yanncks opened this issue Jun 11, 2021 · 9 comments
Closed

Gradle compileSolidity error #36

yanncks opened this issue Jun 11, 2021 · 9 comments

Comments

@yanncks
Copy link

yanncks commented Jun 11, 2021

Getting this error:

Some problems were found with the configuration of task ':compileSolidity' (type 'SolidityCompile').

  • Type 'SolidityCompile' field 'pathRemappings' without corresponding getter has been annotated with @input, @optional.

The getter and setters in that class are missing the "s".

@xaviarias
Copy link
Contributor

Hi, which code are you compiling? Master branch builds OK.

@yanncks
Copy link
Author

yanncks commented Jun 12, 2021

Version 4.8.4.

Doesn't this look wrong?
https://github.com/web3j/solidity-gradle-plugin/blob/027b081ee2079c5f537d6cb55a8edce2b2748b9e/src/main/groovy/org/web3j/solidity/gradle/plugin/SolidityCompile.groovy#L238

Getter/setter needs to match field name. They're missing the "s".

@xaviarias
Copy link
Contributor

Yes they should be by convention, but is it giving you an error?

@yanncks
Copy link
Author

yanncks commented Jun 14, 2021

Yes, it gives me the error that I posted above. I think it's not just convention, but gradle looks for getter/setter by name like this.

@xaviarias
Copy link
Contributor

@larpras I just built the project locally on master branch and it works.

Please can you paste your build command and the complete output? Thanks.

@yanncks
Copy link
Author

yanncks commented Jun 16, 2021

It's just ./gradlew build with pretty much the default starter project. Maybe the only thing I did was upgrade Gradle to 7.0.

Longer form of the error:

Some problems were found with the configuration of task ':compileSolidity' (type 'SolidityCompile').

@xaviarias
Copy link
Contributor

Could you try with the project version of Gradle? Is possible that the new one enforces this naming.

@eliquinox
Copy link

Same problem as @larpras when trying to build with gradle 7.0. Here is the PR: #37

@xaviarias
Copy link
Contributor

Fixed in release 0.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants