-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
112 lines (101 loc) · 3.26 KB
/
build.gradle
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
plugins {
id 'java-library'
id 'java'
id 'maven-publish'
id 'signing'
id "io.codearte.nexus-staging" version "0.30.0"
id "com.github.hierynomus.license" version "0.16.1"
}
group = 'de.eosts'
version = '3.0.2-SNAPSHOT'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
ext {
pactVersion = '4.2.21'
wireMockVersion = '2.35.1'
}
dependencies {
api "com.github.tomakehurst:wiremock-jre8:${wireMockVersion}"
api "au.com.dius.pact:provider:${pactVersion}"
api "au.com.dius.pact.core:model:${pactVersion}"
implementation("org.jetbrains.kotlin:kotlin-reflect:1.6.0") {
because("required to instantiate PactBrokerLoader")
}
implementation('org.json:json:20211205') {
because("relying only on the transitive dependency of au.com.dius.pact:consumer results in cannot access JSONObject")
}
testImplementation "au.com.dius.pact:consumer:${pactVersion}"
testImplementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.1"
testImplementation 'junit:junit:4.13.2'
}
repositories {
repositories {
mavenLocal()
mavenCentral()
}
mavenCentral()
}
java {
sourceCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
wrapper {
gradleVersion = '7.2'
}
license {
header = file('HEADER')
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = 'EOS Technology Solutions GmbH'
skipExistingHeaders = true
mapping {
java = 'SLASHSTAR_STYLE'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'pact-stubs'
from components.java
pom {
name = 'Pact Stubs'
description = 'Generate Stubs from Pacts for WireMock and Messaging'
url = 'https://github.com/EOS-TS/pact-stubs'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'cmuelhau'
name = 'Christian Muelhaupt'
}
}
scm {
connection = 'scm:git:https://github.com/EOS-TS/pact-stubs.git'
developerConnection = 'scm:git:[email protected]:EOS-TS/pact-stubs.git'
url = 'https://github.com/EOS-TS/pact-stubs'
}
}
}
}
repositories {
maven {
credentials {
username nexusUsername
password nexusPassword
}
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots'
url = isReleaseVersion ? releasesRepoUrl : snapshotsRepoUrl
}
}
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}