-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
143 lines (120 loc) · 3.17 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
val ossrhUsername: String? by project
val ossrhPassword: String? by project
val signingKeyId: String? by project
val signingKey: String? by project
val signingPassword: String? by project
plugins {
kotlin("jvm") version "1.7.20"
kotlin("kapt") version "1.7.20"
`maven-publish`
signing
}
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply(plugin = "kotlin")
apply(plugin = "kotlin-kapt")
apply(plugin = "maven-publish")
apply(plugin = "signing")
group = "so.kciter"
version = "0.0.8"
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = "11"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
}
}
val sourcesJar by creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
val javadocJar by creating(Jar::class) {
dependsOn.add(javadoc)
archiveClassifier.set("javadoc")
from(javadoc)
}
artifacts {
archives(sourcesJar)
archives(javadocJar)
archives(jar)
}
}
configure<PublishingExtension> {
repositories {
maven {
if (project.version.toString().endsWith("SNAPSHOT")) {
setUrl("https://s01.oss.sonatype.org/content/repositories/snapshots/")
} else {
setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
}
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
publications.withType<MavenPublication> {
from(components["java"])
artifact(tasks["sourcesJar"])
artifact(tasks["javadocJar"])
pom {
packaging = "jar"
name.set(project.name)
url.set("https://github.com/kciter/thing")
inceptionYear.set("2023")
licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("kciter")
name.set("Sunhyoup Lee")
email.set("[email protected]")
url.set("https://github.com/kciter")
timezone.set("Asia/Seoul")
}
}
contributors {
contributor {
name.set("Sally Oh")
email.set("[email protected]")
url.set("https://github.com/sallyjellyy")
}
contributor {
name.set("roach")
email.set("[email protected]")
url.set("https://github.com/tmdgusya")
}
}
scm {
connection.set("scm:git:https://github.com/kciter/thing")
developerConnection.set("scm:git:[email protected]:kciter/thing.git")
url.set("https://github.com/kciter/thing")
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/kciter/thing/issues")
}
ciManagement {
system.set("GitHub")
url.set("https://github.com/kciter/thing/actions?query=workflow%3Aci")
}
}
}
}
signing {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publishing.publications)
}
}