Skip to content

Commit 398d19e

Browse files
committed
upgraded gradle & pact
1 parent d74b3cf commit 398d19e

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

build.gradle

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,7 @@ dependencies {
323323

324324
contractTestImplementation group: 'org.apache.httpcomponents', name: 'httpclient', version: versions.httpComponents
325325
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'junit5', version: versions.pact_version
326-
contractTestImplementation group: 'au.com.dius.pact.consumer', name: 'java8', version: versions.pact_version
327326
contractTestRuntime group: 'au.com.dius.pact.consumer', name: 'junit5', version: versions.pact_version
328-
contractTestRuntime group: 'au.com.dius.pact.consumer', name: 'java8', version: versions.pact_version
329327

330328
contractTestImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
331329
contractTestImplementation("org.junit.jupiter:junit-jupiter-api:5.10.2")
@@ -564,30 +562,29 @@ run {
564562
}
565563
}
566564

565+
567566
project.ext {
568567
pactVersion = getCheckedOutGitCommitHash()
569568
}
570569

570+
pact {
571+
publish {
572+
pactDirectory = 'pacts'
573+
pactBrokerUrl = System.getenv("PACT_BROKER_FULL_URL") ?: 'http://localhost:80'
574+
tags = [System.getenv("PACT_BRANCH_NAME") ?:'Dev']
575+
version = project.pactVersion
576+
}
577+
}
578+
571579
task runAndPublishConsumerPactTests(type: Test){
580+
dependsOn(contract)
572581
logger.lifecycle("Runs pact Tests")
573582
testClassesDirs = sourceSets.contractTest.output.classesDirs
574583
classpath = sourceSets.contractTest.runtimeClasspath
575-
584+
finalizedBy(pactPublish)
576585
}
577586

578-
runAndPublishConsumerPactTests.dependsOn contract
579-
580-
runAndPublishConsumerPactTests.finalizedBy pactPublish
581-
582587
def getCheckedOutGitCommitHash() {
583588
'git rev-parse --verify --short HEAD'.execute().text.trim()
584589
}
585590

586-
pact {
587-
publish {
588-
pactDirectory = 'pacts'
589-
pactBrokerUrl = System.getenv("PACT_BROKER_FULL_URL") ?: 'http://localhost:80'
590-
tags = [System.getenv("PACT_BRANCH_NAME") ?:'Dev']
591-
version = project.pactVersion
592-
}
593-
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip

0 commit comments

Comments
 (0)