-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle.kts
90 lines (74 loc) · 2.46 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
plugins {
`java-library`
`maven-publish`
signing
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withJavadocJar()
withSourcesJar()
}
group = "cn.enaium"
version = property("version").toString()
repositories {
mavenCentral()
}
val springboot: String by project
val annotations: String by project
dependencies {
implementation("org.jetbrains:annotations:$annotations")
implementation("org.springframework.boot:spring-boot-starter-webflux:$springboot")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:$springboot")
testImplementation("org.springframework.boot:spring-boot-starter-test:$springboot")
}
tasks.test {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = "kook-spring-boot-starter"
from(components["java"])
pom {
name.set("kook-spring-boot-starter")
description.set("KOOK机器人的spring-boot-starter")
url.set("https://github.com/Enaium/kook-spring-boot-starter/")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("enaium")
name.set("Enaium")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/Enaium/kook-spring-boot-starter.git")
developerConnection.set("scm:git:https://github.com/Enaium/kook-spring-boot-starter.git")
url.set("https://github.com/Enaium/kook-spring-boot-starter/")
}
}
}
}
repositories {
maven {
url = uri(
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = project.properties["ossrhUsername"].toString()
password = project.properties["ossrhPassword"].toString()
}
}
}
}
signing {
project.properties["signing.secretKeyRingFile"]?.let {
sign(publishing.publications["mavenJava"])
}
}