Fixed the order of tasks

without this change generate contract tests task wasn't forced to be before any test compilation tasks
with this change that's fixed

fixes #223
This commit is contained in:
Marcin Grzejszczak
2017-02-13 17:32:47 +01:00
parent 047addfe84
commit 902934f9e3
3 changed files with 5 additions and 0 deletions

View File

@@ -121,6 +121,7 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
configProperties = { extension }
}
task.dependsOn copyContracts
project.tasks.findByName("compileTestJava").dependsOn(task)
}
private void createAndConfigureGenerateWireMockClientStubsFromDslTask(ContractVerifierExtension extension,

View File

@@ -32,6 +32,7 @@ class SampleJerseyProjectSpec extends ContractVerifierIntegrationSpec {
expect:
runTasksSuccessfully(checkAndPublishToMavenLocal())
jarContainsContractVerifierContracts('fraudDetectionService/build/libs')
fileExists("fraudDetectionService/build/test-results/test/TEST-org.springframework.cloud.contract.verifier.tests.contracts.com.example.jersey.FraudDetectionServiceSpec.xml")
}
def "should pass basic flow for JUnit"() {
@@ -41,6 +42,7 @@ class SampleJerseyProjectSpec extends ContractVerifierIntegrationSpec {
expect:
runTasksSuccessfully(checkAndPublishToMavenLocal())
jarContainsContractVerifierContracts('fraudDetectionService/build/libs')
fileExists("fraudDetectionService/build/test-results/test/TEST-org.springframework.cloud.contract.verifier.tests.contracts.com.example.jersey.FraudDetectionServiceTest.xml")
}
}

View File

@@ -24,6 +24,8 @@ buildscript {
}
}
apply plugin: 'checkstyle'
allprojects {
group = 'com.example.jersey'
}