spring-cloud-contract-spec-groovy
contains extension modules to the spring-cloud-contract-spec-java
classes. The spring-cloud-contract-spec
module includes both the groovy
and the java
modules together.
The whole project is being built and tested successfully apart from the integration with Gradle.
Clone the project, checkout the branch and build the whole thing without running tests:
$ git clone https://github.com/spring-cloud/spring-cloud-contract.git
$ cd spring-cloud-contract
$ git checkout rewriting_to_java
$ ./mvnw clean install -DskipTests -T 4 -Pfast
Now either you can run a build of the spring-cloud-contract-gradle
project that will execute tests that will fail
$ cd spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin
$ ./gradlew clean build
or you can run a "normal" gradle project build. I guess using a standalone project will give you a "cleaner" classpath since in the plugin we use Nebula to setup classpath for tests.
$ cd samples/standalone/dsl/http-server/
$ /.gradlew clean build
-
specs/spring-cloud-contract-spec-java/src/main/java/org/springframework/cloud/contract/spec/Contract.java
- Java class that Groovy should extend with additional static and nonstatic methods -
specs/spring-cloud-contract-spec-groovy/src/main/groovy/org/springframework/cloud/contract/spec/internal/ContractStaticExtension.groovy
- extension module class -
specs/spring-cloud-contract-spec-groovy/src/main/resources/META-INF/groovy/org.codehaus.groovy.runtime.ExtensionModule
- extension module configuration -
spring-cloud-contract-verifier/src/main/groovy/org/springframework/cloud/contract/verifier/util/ContractVerifierDslConverter.groovy
- class that parses a contract DSL at runtime in order to generate tests and stubs (maybe class loaders are a problem there?) -
spring-cloud-contract-tools/spring-cloud-contract-gradle-plugin
- the Gradle project setup