-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
109 lines (97 loc) · 3.74 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
plugins {
`maven-publish`
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
signing
id("io.micronaut.test-resources") version "3.7.7" apply (false)
}
description = "Test-Resources for Spring Boot"
group = "io.cloudflight.testresources.springboot"
autoConfigure {
java {
languageVersion.set(JavaLanguageVersion.of(17))
vendorName.set("Cloudflight")
}
}
subprojects {
repositories {
mavenCentral()
}
configurations {
all {
exclude(group = "junit")
}
}
if (!this.path.startsWith(":testprojects")) {
plugins.apply(MavenPublishPlugin::class)
plugins.apply(SigningPlugin::class)
}
afterEvaluate {
if (this.subprojects.isEmpty()) {
dependencies {
"testImplementation"(libs.jupiter.api)
"testRuntimeOnly"(libs.jupiter.engine)
"testImplementation"(libs.assertj)
}
}
if (!this.path.startsWith(":testprojects")) {
if (!name.endsWith("-client")) {
dependencies {
"implementation"(libs.micronaut.testresources.testcontainers)
"implementation"(libs.testcontainers.junit4.mock)
}
}
configure<PublishingExtension> {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set(project.name)
description.set(project.description)
url.set("https://github.com/cloudflightio/springboot-testresources")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
inceptionYear.set("2023")
organization {
name.set("Cloudflight")
url.set("https://cloudflight.io")
}
developers {
developer {
id.set("cloudflight")
name.set("Cloudflight Team")
email.set("[email protected]")
}
}
scm {
connection.set("scm:[email protected]:cloudflightio/springboot-testresources.git")
developerConnection.set("scm:[email protected]:cloudflightio/springboot-testresources.git")
url.set("https://github.com/cloudflightio/springboot-testresources")
}
}
}
}
}
configure<SigningExtension> {
setRequired {
System.getenv("PGP_SECRET") != null
}
useInMemoryPgpKeys(System.getenv("PGP_SECRET"), System.getenv("PGP_PASSPHRASE"))
sign(publishing.publications.getByName("maven"))
}
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("MAVEN_USERNAME"))
password.set(System.getenv("MAVEN_PASSWORD"))
}
}
}