-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
122 lines (107 loc) · 3.57 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
113
114
115
116
117
118
119
120
121
122
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id('io.github.gradle-nexus.publish-plugin') version '1.3.0'
}
repositories {
mavenLocal()
maven {
url = uri('https://repo.jenkins-ci.org/public/')
}
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
dependencies {
api 'org.junit.platform:junit-platform-engine:1.8.1'
api 'io.cucumber:gherkin3:3.1.2'
api 'io.cucumber:cucumber-java:7.20.1'
api 'org.junit.platform:junit-platform-launcher:1.8.1'
api 'org.junit.platform:junit-platform-reporting:1.8.1'
api 'org.junit.platform:junit-platform-console:1.8.1'
api 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
api 'com.fasterxml.jackson.core:jackson-annotations:2.15.2'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'org.junit.platform:junit-platform-testkit:1.8.1'
testImplementation 'org.json:json:20231013'
testImplementation 'org.mockito:mockito-core:3.12.4'
}
group = 'com.wire.qa'
description = 'picklejar-engine'
version = System.getenv("version")
project.ext."deploy" = System.getenv("deploy")
def Properties properties = new Properties()
if (file("local.properties").exists()) {
properties.load(project.rootProject.file("local.properties").newDataInputStream())
}
clean {
delete 'target'
}
test {
useJUnitPlatform()
maxHeapSize = '1G'
testLogging {
showStandardStreams = true
events "passed", "skipped", "failed"
}
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.release = 11
}
tasks.withType(Javadoc) {
options.encoding = 'UTF-8'
}
nexusPublishing {
repositories {
sonatype {
username = properties.getProperty("sonatype.username") ?: System.getenv("SONATYPE_USERNAME")
password = properties.getProperty("sonatype.password") ?: System.getenv("SONATYPE_PASSWORD")
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name.set("picklejar-engine")
description.set("A JUnit 5 Test engine for running cucumber test in Java")
url.set("https://github.com/wireapp/picklejar-engine")
licenses {
license {
name.set("GPL-3.0")
url.set("https://opensource.org/licenses/GPL-3.0")
}
}
developers {
developer {
id.set("svenwire")
name.set("Sven Jost")
email.set("[email protected]")
organization.set("Wire Swiss GmbH")
}
}
scm {
connection.set("scm:git:git://github.com/wireapp/picklejar-engine")
developerConnection.set("scm:git:git://github.com/wireapp/picklejar-engine")
url.set("https://github.com/wireapp/picklejar-engine")
}
}
}
}
}
signing {
def signingKeyFile = properties.getProperty("signingKeyFile") ?: System.getenv("PGP_PRIVATE_KEY_FILE")
if (signingKeyFile != "" && signingKeyFile != null) {
def signingKey = new File(signingKeyFile).text
def signingPassword = properties.getProperty("signingPassword") ?: System.getenv("PGP_PASSPHRASE")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
}