-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
102 lines (89 loc) · 3.3 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
plugins {
`maven-publish`
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
signing
`java-library`
}
description = "Spring Boot AutoConfigure Support for the Structurizr Client"
group = "io.cloudflight.structurizr"
autoConfigure {
java {
languageVersion.set(JavaLanguageVersion.of(17))
vendorName.set("Cloudflight")
}
}
repositories {
mavenCentral()
}
dependencies {
implementation(platform(libs.spring.boot.bom))
annotationProcessor(platform(libs.spring.boot.bom))
api(libs.structurizr.core)
api(libs.structurizr.export)
implementation(libs.structurizr.client)
// let that be an API dependency in order publish @SpringBootApplication
api("org.springframework.boot:spring-boot-autoconfigure")
runtimeOnly("org.springframework.boot:spring-boot-starter")
compileOnly("org.springframework.boot:spring-boot-configuration-processor")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-test")
testImplementation(platform(libs.junit.jupiter.bom))
testImplementation(libs.architectureicons)
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
java {
withJavadocJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
pom {
name.set(project.name)
description.set(project.description)
url.set("https://github.com/cloudflightio/structurizr-autoconfigure")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
inceptionYear.set("2022")
organization {
name.set("Cloudflight")
url.set("https://cloudflight.io")
}
developers {
developer {
id.set("cloudflightio")
name.set("Cloudflight Team")
email.set("[email protected]")
}
}
scm {
connection.set("scm:[email protected]:cloudflightio/structurizr-autoconfigure.git")
developerConnection.set("scm:[email protected]:cloudflightio/structurizr-autoconfigure.git")
url.set("https://github.com/cloudflightio/structurizr-autoconfigure")
}
}
}
}
}
nexusPublishing {
repositories {
sonatype { //only for users registered in Sonatype after 24 Feb 2021
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"))
}
}
}
signing {
setRequired {
System.getenv("PGP_SECRET") != null
}
useInMemoryPgpKeys(System.getenv("PGP_SECRET"), System.getenv("PGP_PASSPHRASE"))
sign(publishing.publications.getByName("maven"))
}