Git ignores the build directory of the Spring-Consumer
[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.2"
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'
23
24         testImplementation('org.springframework.boot:spring-boot-starter-test') {
25                 exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
26         }
27         testImplementation 'au.com.dius.pact.provider:junit5spring:4.2.2'
28 }
29
30 test {
31         useJUnitPlatform()
32 }
33
34 task startServer(type: SpawnProcessTask, dependsOn: 'assemble') {
35         command "java -jar ${projectDir}/build/libs/siren-provider-0.0.1.jar"
36         ready 'Started SirenProviderApplication'
37 }
38
39 task stopServer(type: KillProcessTask)
40
41 pact {
42         serviceProviders {
43                 "Siren Order Provider" {
44
45                         startProviderTask = startServer
46                         terminateProviderTask = stopServer
47
48                         hasPactWith("Siren Consumer") {
49                                 pactSource = file("${projectDir}/../consumer/pacts/Siren Order Provider-Siren Order Service.json")
50                         }
51
52                         hasPactWith("Spring Consumer") {
53                                 pactSource = file("${projectDir}/../spring-consumer/target/pacts/SpringConsumer-SirenOrderProvider.json")
54                         }
55                 }
56         }
57 }