chore: update to Pact JVM 4.2.0-beta.1
[demos/example-siren] / provider / build.gradle
1 plugins {
2         id 'org.springframework.boot' version '2.3.4.RELEASE'
3         id 'io.spring.dependency-management' version '1.0.10.RELEASE'
4         id 'java'
5         id "io.freefair.lombok" version "5.2.1"
6         id "au.com.dius.pact" version "4.2.0-beta.1"
7         id "com.wiredforcode.spawn" version "0.8.2"
8 }
9
10 group = 'io.pactflow.example'
11 version = '0.0.1'
12 sourceCompatibility = '11'
13
14 repositories {
15         mavenLocal()
16         mavenCentral()
17 }
18
19 dependencies {
20         implementation 'org.springframework.boot:spring-boot-starter-hateoas'
21         implementation 'com.jayway.jsonpath:json-path'
22         implementation 'de.ingogriebsch.hateoas:spring-hateoas-siren:1.0.0-M2'
23
24         testImplementation('org.springframework.boot:spring-boot-starter-test') {
25                 exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
26         }
27 }
28
29 test {
30         useJUnitPlatform()
31 }
32
33 task startServer(type: SpawnProcessTask, dependsOn: 'assemble') {
34         command "java -jar ${projectDir}/build/libs/siren-provider-0.0.1.jar"
35         ready 'Started SirenProviderApplication'
36 }
37
38 task stopServer(type: KillProcessTask)
39
40 pact {
41         serviceProviders {
42                 "Siren Order Provider" {
43
44                         startProviderTask = startServer
45                         terminateProviderTask = stopServer
46
47                         hasPactWith("Siren Consumer") {
48                                 pactSource = file("${projectDir}/../consumer/pacts/Siren Order Provider-Siren Order Service.json")
49                         }
50                 }
51         }
52 }