Skip to content

Commit 9643377

Browse files
committed
build: Update maven-publish's config
Signed-off-by: ForteScarlet <[email protected]>
1 parent b34a22e commit 9643377

File tree

6 files changed

+45
-289
lines changed

6 files changed

+45
-289
lines changed

.github/workflows/publish-v4-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
gradle-version: ${{ env.GRADLE_VERSION }}
7575

7676
- name: Publish Release
77-
run: gradle publishAndReleaseToMavenCentral -s --warning-mode all -x test --build-cache --no-configuration-cache
77+
run: gradle publishToMavenCentral -s --warning-mode all -x test --build-cache --no-configuration-cache
7878
env:
7979
SIMBOT_IS_SNAPSHOT: false
8080
SIMBOT_RELEASES_ONLY: true

.github/workflows/publish-v4-snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
gradle-version: ${{ env.GRADLE_VERSION }}
9595

9696
- name: Publish snapshots
97-
run: gradle publishAllPublicationsToMavenCentralRepository --info --warning-mode all -x test
97+
run: gradle publishToMavenCentral --info --warning-mode all -x test
9898
env:
9999
SIMBOT_IS_SNAPSHOT: true
100100
ORG_GRADLE_PROJECT_org.gradle.jvmargs: "-Xms4G -XX:MaxMetaspaceSize=1G -Dfile.encoding=UTF-8"

buildSrc/src/main/kotlin/simbot-jvm-maven-publish.gradle.kts

Lines changed: 0 additions & 90 deletions
This file was deleted.

buildSrc/src/main/kotlin/simbot-maven-publish.gradle.kts

Lines changed: 42 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@
2121
*
2222
*/
2323

24-
import com.vanniktech.maven.publish.SonatypeHost
25-
import gradle.kotlin.dsl.accessors._962842af322993b246b9354775ec3900.mavenPublishing
26-
import love.forte.gradle.common.core.Gpg
2724
import love.forte.gradle.common.core.property.ofIf
28-
import love.forte.gradle.common.publication.configure.configPublishMaven
29-
import love.forte.gradle.common.publication.configure.publishingExtension
30-
import love.forte.gradle.common.publication.configure.setupPom
31-
import org.jetbrains.kotlin.com.intellij.openapi.util.text.HtmlChunk.p
32-
import utils.checkPublishConfigurable
3325

3426
plugins {
3527
signing
@@ -39,57 +31,55 @@ plugins {
3931

4032
val p = project
4133

42-
// checkPublishConfigurable {
43-
mavenPublishing {
44-
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
45-
if (!isSimbotLocal()) {
46-
signAllPublications()
47-
}
48-
coordinates(groupId = p.group.toString(), artifactId = p.name, version = p.version.toString())
34+
mavenPublishing {
35+
publishToMavenCentral(automaticRelease = true)
36+
if (!isSimbotLocal()) {
37+
signAllPublications()
38+
}
39+
coordinates(groupId = p.group.toString(), artifactId = p.name, version = p.version.toString())
4940

50-
pom {
51-
name = p.name
52-
description = p.description
53-
url = P.HOMEPAGE
54-
licenses {
55-
P.Simbot.licenses.forEach { license ->
56-
license {
57-
name ofIf license.name
58-
url ofIf license.url
59-
distribution ofIf license.distribution
60-
comments ofIf license.comments
61-
}
41+
pom {
42+
name = p.name
43+
description = p.description
44+
url = P.HOMEPAGE
45+
licenses {
46+
P.Simbot.licenses.forEach { license ->
47+
license {
48+
name ofIf license.name
49+
url ofIf license.url
50+
distribution ofIf license.distribution
51+
comments ofIf license.comments
6252
}
6353
}
54+
}
6455

65-
val scm = P.Simbot.scm
66-
scm {
67-
url ofIf scm.url
68-
connection ofIf scm.connection
69-
developerConnection ofIf scm.developerConnection
70-
tag ofIf scm.tag
71-
}
56+
val scm = P.Simbot.scm
57+
scm {
58+
url ofIf scm.url
59+
connection ofIf scm.connection
60+
developerConnection ofIf scm.developerConnection
61+
tag ofIf scm.tag
62+
}
7263

73-
developers {
74-
P.Simbot.developers.forEach { developer ->
75-
developer {
76-
id ofIf developer.id
77-
name ofIf developer.name
78-
email ofIf developer.email
79-
url ofIf developer.url
80-
organization ofIf developer.organization
81-
organizationUrl ofIf developer.organizationUrl
82-
timezone ofIf developer.timezone
83-
roles.addAll(developer.roles)
84-
properties.putAll(developer.properties)
85-
}
64+
developers {
65+
P.Simbot.developers.forEach { developer ->
66+
developer {
67+
id ofIf developer.id
68+
name ofIf developer.name
69+
email ofIf developer.email
70+
url ofIf developer.url
71+
organization ofIf developer.organization
72+
organizationUrl ofIf developer.organizationUrl
73+
timezone ofIf developer.timezone
74+
roles.addAll(developer.roles)
75+
properties.putAll(developer.properties)
8676
}
8777
}
78+
}
8879

89-
issueManagement {
90-
system.set("GitHub Issues")
91-
url.set("https://github.com/simple-robot/simpler-robot/issues")
92-
}
80+
issueManagement {
81+
system.set("GitHub Issues")
82+
url.set("https://github.com/simple-robot/simpler-robot/issues")
9383
}
9484
}
95-
// }
85+
}

buildSrc/src/main/kotlin/simbot-multiplatform-maven-publish.gradle.kts

Lines changed: 0 additions & 144 deletions
This file was deleted.

website

0 commit comments

Comments
 (0)