Invalid Gradle build configuration when Spring Cloud Contract is included
See original GitHub issueAs reported in spring-cloud/spring-cloud-contract gh-1795, the Gradle configuration as created by Initializer is invalid with respect to configuring the contracts
extension. Presently, SpringCloudContractGradleBuildCustomizer.java#L75-L83, adds the configuration to a task with the name contracts
which does not exist. This then results in build failures with the default project configuration directly provided by Initializer.
Incorrect:
tasks.named("contracts") {
testFramework = org.springframework.cloud.contract.verifier.config.TestFramework.JUNIT5
}
Correct:
contracts {
testFramework = org.springframework.cloud.contract.verifier.config.TestFramework.JUNIT5
}
Issue Analytics
- State:
- Created a year ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
4. Spring Cloud Contract Verifier Setup
To learn how to set up the Gradle project for Spring Cloud Contract ... Gradle Plugin setup creates the following Gradle part of...
Read more >Generated tests fail in Spring Cloud Contract - Stack Overflow
I have a groovy file which has a post request and a response. When I do gradle build , the tests are autogenerated...
Read more >spring-cloud/spring-cloud-contract - Gitter
configuration is for SCM, when you use GIT to store contracts and using Artifactory in this case is wrong? Marcin ...
Read more >Better Integration Testing With Spring Cloud Contract
Producer Starter Configuration. You are creating a Java project – Java 11 – using Maven as the build system. The Spring Boot version...
Read more >An Intro to Spring Cloud Contract - Baeldung
When we run the build, the plugin automatically generates a test class named ContractVerifierTest that extends our BaseTestClass and puts it in ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, junit5 is the default. The error is to be expected. You need a contract.
@bwgjoseph It doesn’t but we should be able to generate the right bits now. I’ll try to spare some cycles to look at it.