-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
113 lines (93 loc) · 3.51 KB
/
build.gradle.kts
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
import java.lang.System;
plugins {
java
`maven-publish`
`signing`
}
subprojects {
group = "com.github.jeanbaptistewatenberg.junit5kubernetes"
version = "2.3.2-beta"
repositories {
mavenCentral()
}
apply {
plugin("java")
plugin("java-library")
plugin("maven-publish")
plugin("signing")
}
java {
withJavadocJar()
withSourcesJar()
}
dependencies {
testImplementation("org.assertj:assertj-core:3.11.1")
testImplementation("org.junit.jupiter:junit-jupiter:5.6.2")
}
publishing {
repositories {
maven {
name = "MavenCentral"
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = System.getenv("ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME")
password = System.getenv("ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD")
}
}
}
publications {
create<MavenPublication>("default") {
from(components["java"])
pom {
name.set("junit5-kubernetes")
description.set("Use pod and other kubernetes object right form your junit5 tests.")
url.set("https://github.com/JeanBaptisteWATENBERG/junit5-kubernetes")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("JeanBaptisteWATENBERG")
name.set("Jean-Baptiste WATENBERG")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/JeanBaptisteWATENBERG/junit5-kubernetes.git")
developerConnection.set("scm:git:ssh://github.com/JeanBaptisteWATENBERG/junit5-kubernetes.git")
url.set("https://github.com/JeanBaptisteWATENBERG/junit5-kubernetes")
}
}
}
}
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["default"])
}
tasks.test {
useJUnitPlatform()
testLogging {
// set to false to disable detailed failure logs
showExceptions = true
// set to false to hide stack traces
showStackTraces = true
// set to false to hide exception causes
showCauses = true
// enable to see standard out and error streams inline with the test results
showStandardStreams = true
events("passed", "skipped", "failed")
}
systemProperties = System.getProperties().map { e -> Pair(e.key as String, e.value) }.toMap()
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
}