Skip to content

Commit 3229147

Browse files
Jonas Saabelclaude
andcommitted
feat: configure Maven Central publishing with Vanniktech plugin
Set up complete publishing infrastructure for Maven Central Portal: - Added Vanniktech Maven Publish plugin (0.30.0) for new Portal API - Updated Dokka to 2.1.0 with V2 migration enabled - Updated Ktor dependencies to 3.3.1 - Configured POM metadata (MIT license, developer info, SCM) - Set JVM toolchain to 17 for wide compatibility - Disabled configuration cache (incompatible with publishing) - Configured GPG signing with signAllPublications() Also created comprehensive journal documenting the entire setup process, including GPG key configuration, secring.gpg generation, and detailed pre-release checklist for final publication. Phase 2 (Maven Central setup) in progress - artifacts uploaded to Portal, awaiting final pre-release checks before publishing v0.1.0. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a10efa5 commit 3229147

File tree

4 files changed

+504
-3
lines changed

4 files changed

+504
-3
lines changed

build.gradle.kts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
33
plugins {
44
application
55
alias(libs.plugins.ben.manes.versions)
6+
alias(libs.plugins.dokka)
67
alias(libs.plugins.kotlin.jvm)
78
alias(libs.plugins.kotlin.serialization)
89
alias(libs.plugins.kotlinter)
10+
alias(libs.plugins.maven.publish)
911
}
1012

1113
group = "it.saabel"
@@ -54,3 +56,51 @@ tasks.withType<DependencyUpdatesTask> {
5456
isNonStable(candidate.version) && !isNonStable(currentVersion)
5557
}
5658
}
59+
60+
// Configure Java plugin for JVM toolchain
61+
java {
62+
toolchain {
63+
languageVersion.set(JavaLanguageVersion.of(17))
64+
}
65+
}
66+
67+
// Vanniktech Maven Publish Plugin Configuration
68+
mavenPublishing {
69+
// Publish to Maven Central Portal (new system)
70+
publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.CENTRAL_PORTAL)
71+
72+
// Sign all publications with GPG
73+
signAllPublications()
74+
75+
// Configure POM metadata
76+
coordinates("it.saabel", "kotlin-notion-client", "0.1.0")
77+
78+
pom {
79+
name.set("Kotlin Notion Client")
80+
description.set("A modern, type-safe Kotlin client for the Notion API with comprehensive DSL support and coroutine-based operations")
81+
url.set("https://github.com/jsaabel/kotlin-notion-client")
82+
83+
licenses {
84+
license {
85+
name.set("MIT License")
86+
url.set("https://opensource.org/licenses/MIT")
87+
distribution.set("repo")
88+
}
89+
}
90+
91+
developers {
92+
developer {
93+
id.set("jsaabel")
94+
name.set("Jonas Saabel")
95+
email.set("jonas@saabel.it")
96+
url.set("https://saabel.it")
97+
}
98+
}
99+
100+
scm {
101+
connection.set("scm:git:git://github.com/jsaabel/kotlin-notion-client.git")
102+
developerConnection.set("scm:git:ssh://github.com/jsaabel/kotlin-notion-client.git")
103+
url.set("https://github.com/jsaabel/kotlin-notion-client")
104+
}
105+
}
106+
}

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
kotlin.code.style=official
2-
org.gradle.configuration-cache=true
2+
org.gradle.configuration-cache=false
3+
org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers

gradle/libs.versions.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
[versions]
2-
kotest = "6.0.3"
2+
kotest = "6.0.4"
33
ben-manes-versions = "0.53.0"
4+
dokka = "2.1.0"
45
kotlin = "2.2.20"
56
kotlinter = "5.2.0"
7+
maven-publish = "0.30.0"
68
# kotlinx-datetime: Using 0.6.2 instead of 0.7.x because 0.7.x migrated to kotlin.time.Instant
79
# which is still @ExperimentalTime in Kotlin 2.2. Using experimental APIs in a library is
810
# problematic as it forces instability on users. 0.6.x uses stable kotlinx.datetime.Instant.
911
# We'll upgrade to 0.7.x+ when kotlin.time types are stabilized (likely Kotlin 2.3+).
1012
kotlinx-datetime = "0.6.2"
1113
kotlinx-serialization-json = "1.9.0"
12-
ktor = "3.3.0"
14+
ktor = "3.3.1"
1315
logback = "1.5.19"
1416
slf4j = "2.0.17"
1517

1618
[plugins]
1719
ben-manes-versions = { id = "com.github.ben-manes.versions", version.ref = "ben-manes-versions" }
20+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
1821
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
1922
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
2023
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
24+
maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" }
2125

2226
[libraries]
2327
kotest-runner-junit5 = { group = "io.kotest", name = "kotest-runner-junit5", version.ref = "kotest" }

0 commit comments

Comments
 (0)