1 year ago
#260659
Nidhi S
I'm getting error in upgrading the gradle version from 6.8 to 7.4
I tried building my project with gradle version 7.4, but I couldn't. It was working fine with the gradle version 6.8. I'm using the spring-cloud-contract-verifier version : 3.1.1
I got this kind of error message when I tried building with the gradle 7.4:
- What went wrong:
Some problems were found with the configuration of task ':copyContracts' (type'ContractsCopyTask').
In plugin 'org.springframework.cloud.contract' type 'org.springframework.cloud.contract.verifier.plugin.ContractsCopyTask' property 'config.backupContractsFolder' of mutable type 'org.gradle.api.file.DirectoryProperty' is writable.
Reason: Properties of type 'org.gradle.api.file.DirectoryProperty' are already mutable.
Possible solution: Remove the 'setBackupContractsFolder' method.
Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
In plugin 'org.springframework.cloud.contract' type 'org.springframework.cloud.contract.verifier.plugin.ContractsCopyTask' property 'config.contractsDirectoryPath' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
- Add an input or output annotation.
- Mark it as @Internal.
Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#missing_annotation for more details about this problem.
In plugin 'org.springframework.cloud.contract' type 'org.springframework.cloud.contract.verifier.plugin.ContractsCopyTask' property 'config.contractsMode' of mutable type 'org.gradle.api.provider.Property' is writable.
Reason: Properties of type 'org.gradle.api.provider.Property' are already mutable.
Possible solution: Remove the 'setContractsMode' method.
Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
In plugin 'org.springframework.cloud.contract' type 'org.springframework.cloud.contract.verifier.plugin.ContractsCopyTask' property 'config.contractsPath' of mutable type 'org.gradle.api.provider.Property' is writable.
Reason: Properties of type 'org.gradle.api.provider.Property' are already mutable.
Possible solution: Remove the 'setContractsPath' method.
Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
In plugin 'org.springframework.cloud.contract' type 'org.springframework.cloud.contract.verifier.plugin.ContractsCopyTask' property 'config.copiedContractsFolder' of mutable type 'org.gradle.api.file.DirectoryProperty' is writable.
Reason: Properties of type 'org.gradle.api.file.DirectoryProperty' are already mutable.
Possible solution: Remove the 'setCopiedContractsFolder' method.
Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
spring-boot
gradle
build.gradle
spring-cloud-contract
0 Answers
Your Answer