Skip to content

Commit 8f8e867

Browse files
chore(publish): cut Maven Central file and release counts (#50)
Upgrade vanniktech-maven-publish to 0.37.0, whose defaults publish only md5/sha1 checksums and drop the redundant signature checksums and sha256/sha512 (~380 -> ~152 files per release). Fix the removed SonatypeHost API by calling publishToMavenCentral() with no argument. Derive the publish version from the git tag so pre-release tags (X.Y.Z-rcN) publish an overwriting X.Y.Z-SNAPSHOT to the separate, quota-exempt snapshot repository instead of a full release; clean X.Y.Z tags still release.
1 parent 027c4db commit 8f8e867

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

buildSrc/src/main/kotlin/common-maven.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import com.vanniktech.maven.publish.SonatypeHost.Companion.CENTRAL_PORTAL
2-
31
plugins { id("com.vanniktech.maven.publish") }
42

53
group = "com.caplin.integration.datasourcex"
64

7-
val configuredVersion = System.getenv("GITHUB_REF_NAME") ?: "dev"
5+
val refName = System.getenv("GITHUB_REF_NAME") ?: "dev"
86

9-
version = configuredVersion
7+
// Pre-release tags (X.Y.Z-rcN) publish as an overwriting SNAPSHOT to stay under Maven Central's
8+
// monthly release/file limits; a clean X.Y.Z tag publishes a release. See docs/adr/0002.
9+
version = if (refName.contains('-')) "${refName.substringBefore('-')}-SNAPSHOT" else refName
1010

1111
mavenPublishing {
12-
publishToMavenCentral(CENTRAL_PORTAL)
12+
publishToMavenCentral()
1313

1414
signAllPublications()
1515

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spotless-plugin = "8.6.0"
2424
dokka-plugin = "2.2.0"
2525
binary-compatibility-validator-plugin = "0.18.1"
2626
kover-plugin = "0.9.8"
27-
vanniktech-maven-publish-plugin = "0.31.0"
27+
vanniktech-maven-publish-plugin = "0.37.0"
2828
spring-dependency-management-plugin = "1.1.7"
2929

3030

0 commit comments

Comments
 (0)