Closed yanncks closed 3 years ago
Hi, which code are you compiling? Master branch builds OK.
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".
Yes they should be by convention, but is it giving you an error?
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.
@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.
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').
Type 'SolidityCompile' field 'pathRemappings' without corresponding getter has been annotated with @Input, @Optional.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:
- Add a getter for field 'pathRemappings'.
- Remove the annotations on 'pathRemappings'.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
Could you try with the project version of Gradle? Is possible that the new one enforces this naming.
Same problem as @larpras when trying to build with gradle 7.0. Here is the PR: https://github.com/web3j/solidity-gradle-plugin/pull/37
Fixed in release 0.3.2.
Getting this error:
The getter and setters in that class are missing the "s".