@@ -28,10 +28,8 @@ plugins {
28
28
alias(libs.plugins.benmanes.versions)
29
29
alias(libs.plugins.kover)
30
30
alias(libs.plugins.binarycompatibility)
31
- alias(libs.plugins.nexus)
32
31
alias(libs.plugins.poko)
33
- `maven- publish`
34
- signing
32
+ alias(libs.plugins.mavenpublish)
35
33
}
36
34
37
35
group = " dev.jamesyox"
@@ -151,73 +149,39 @@ tasks.register("allDetekt") {
151
149
}
152
150
}
153
151
154
- nexusPublishing {
155
- repositories {
156
- sonatype {
157
- val ossrhUsername: String? by project
158
- val ossrhPassword: String? by project
159
- val ossrhStagingProfileId: String? by project
152
+ mavenPublishing {
153
+ publishToMavenCentral()
154
+ signAllPublications()
160
155
161
- nexusUrl.set(uri(" https://s01.oss.sonatype.org/service/local/" ))
162
- snapshotRepositoryUrl.set(uri(" https://s01.oss.sonatype.org/content/repositories/snapshots/" ))
156
+ coordinates(groupId = project.group.toString(), artifactId = project.name)
163
157
164
- username = ossrhUsername
165
- password = ossrhPassword
166
- stagingProfileId = ossrhStagingProfileId
167
- }
168
- }
169
- }
170
-
171
- signing {
172
- isRequired = gradle.taskGraph.hasTask(" publish" )
173
- sign(publishing.publications)
174
- }
175
-
176
- publishing {
177
- publications.withType<MavenPublication > {
178
- groupId = project.group.toString()
179
- version = libs.versions.current.get()
180
- val publication = this
181
- val dokkaJar = tasks.register<Jar >(" ${publication.name} DokkaJar" ) {
182
- group = JavaBasePlugin .DOCUMENTATION_GROUP
183
- description = " Assembles Kotlin docs with Dokka into a Javadoc jar"
184
- archiveClassifier.set(" javadoc" )
185
- from(tasks.named(" dokkaHtml" ))
186
- // Each archive name should be distinct, to avoid implicit dependency issues.
187
- // We use the same format as the sources Jar tasks.
188
- // https://youtrack.jetbrains.com/issue/KT-46466
189
- archiveBaseName.set(" ${archiveBaseName.get()} -${publication.name} " )
190
- }
191
-
192
- artifact(dokkaJar)
193
-
194
- pom {
195
- name = project.name
196
- description = " TODO"
197
- url = " http://www.jamesyox.dev/kastro"
158
+ pom {
159
+ name = project.name
160
+ description = " Calculates the time of solar and lunar events"
161
+ url = " http://www.jamesyox.dev/kastro"
198
162
199
- licenses {
200
- license {
201
- name = " Apache License, Version 2.0"
202
- url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
203
- }
163
+ licenses {
164
+ license {
165
+ name = " Apache License, Version 2.0"
166
+ url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
204
167
}
168
+ }
205
169
206
- developers {
207
- developer {
208
- name = " James Yox"
209
- id = " yoxjames"
210
- url = " http://www.jamesyox.dev"
211
- }
170
+ developers {
171
+ developer {
172
+ name = " James Yox"
173
+ id = " yoxjames"
174
+ url = " http://www.jamesyox.dev"
212
175
}
176
+ }
213
177
214
- scm {
215
- connection = " scm:git:github.com/yoxjames/Kastro.git"
216
- developerConnection = " scm:git:ssh://github.com/yoxjames/Kastro.git"
217
- url = " https://github.com/yoxjames/Kastro"
218
- }
178
+ scm {
179
+ connection = " scm:git:github.com/yoxjames/Kastro.git"
180
+ developerConnection = " scm:git:ssh://github.com/yoxjames/Kastro.git"
181
+ url = " https://github.com/yoxjames/Kastro"
219
182
}
220
183
}
184
+
221
185
}
222
186
223
187
fun String.isNonStable (): Boolean {
@@ -232,11 +196,3 @@ tasks.dependencyUpdates {
232
196
candidate.version.isNonStable()
233
197
}
234
198
}
235
-
236
- /*
237
- apiValidation {
238
- @OptIn(kotlinx.validation.ExperimentalBCVApi::class)
239
- klib {
240
- enabled = true
241
- }
242
- }*/
0 commit comments