-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
96 lines (82 loc) · 3.63 KB
/
Copy pathbuild.gradle
File metadata and controls
96 lines (82 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.2.1/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building an application
id 'application'
id "au.com.dius.pact" version "3.6.2"
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is found on compile classpath of this component and consumers.
compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version:'4.5.1'
compile group: 'org.json', name: 'json', version:'20171018'
compile 'com.google.guava:guava:27.0.1-jre'
compile 'io.vertx:vertx-core:3.5.0'
compile 'io.vertx:vertx-web:3.5.0'
compile("au.com.dius:pact-jvm-consumer-junit_2.12:3.6.2")
compile("au.com.dius:pact-jvm-consumer-java8_2.12:3.6.2")
compile("au.com.dius:pact-jvm-provider-junit5_2.12:3.6.2")
compile("au.com.dius:pact-jvm-provider-junit_2.12:3.6.2")
compile("org.scala-lang:scala-reflect:2.12.1")
compile("org.scala-lang:scala-compiler:2.12.1")
compile("org.scala-lang:scala-library:2.12.1")
compile("javax.xml.bind:jaxb-api:2.2.11")
compile("com.sun.xml.bind:jaxb-core:2.2.11")
compile("com.sun.xml.bind:jaxb-impl:2.2.11")
testCompile group: 'org.junit.platform', name: 'junit-platform-launcher', version: "1.1.0"
// Use JUnit test framework
compile 'junit:junit:4.12'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.2.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.2.0'
compile group: 'com.jayway.restassured', name: 'rest-assured', version: '2.9.0'
}
test {
// Enable JUnit 5 (Gradle 4.6+).
useJUnitPlatform()
}
mainClassName = 'io.vertx.core.Launcher'
pact {
//Run pactPublish task IF you need to publish the Pact files to the broker. Provide the pactUrl, pactUser, pactPassword in Gradle.properties file
publish {
version = "2.0.1"
pactDirectory = 'pacts' // defaults to $buildDir/pacts
//pactBrokerUrl = 'https://cpramik.pact.dius.com.au'
pactBrokerUrl = 'http://localhost'
//pactBrokerUsername = 'rkoi3a2zofejmvwdqrlnoa'
//pactBrokerPassword = 'cl1273g7akvjzzyyhn712'
}
serviceProviders {
// You can define as many as you need, but each must have a unique name
userservice {
// All the provider properties are optional, and have sensible defaults (shown below)
protocol = 'http'
host = 'localhost'
port = 8081
project.version = "2.0.1"
//Verifying pact from Local. Comment the below lines and uncomment hasPactsFromPactBroker if you need to verify results from broker
/*hasPactsWith('test_consumer') {
pactFileLocation = file('pacts')
}*/
//Run pactVerify task if you need to send the verification results back to PactBroker. Provide the pactUrl, pactUser, pactPassword in Gradle.properties file
//You need to publish Pact to broker first by running pactPublish command
//hasPactsFromPactBroker('https://cpramik.pact.dius.com.au', authentication: ['Basic','rkoi3a2zofejmvwdqrlnoa', 'cl1273g7akvjzzyyhn712'])
hasPactsFromPactBroker('http://localhost')
}
}
reports {
defaultReports() // adds the standard console output
markdown // report in markdown format
json // report in json format
}
}