Skip to content

klua 0.1.6 — CI/CD to Maven Central

Choose a tag to compare

@caffeine-mgn caffeine-mgn released this 20 Sep 11:27
· 40 commits to main since this release

CI/CD: tag-triggered Maven Central publish

Adds the publishing infrastructure that was previously wired only for a self-hosted macOS ARM runner.

Build changes

  • Plugin chain swap. maven-publish + pw.binom.publish.PrepareProject → com.vanniktech.maven.publish + org.jetbrains.dokka, both pinned in the new gradle/libs.versions.toml catalog.
  • mavenPublishing { publishToMavenCentral(automaticRelease = true); signAllPublications(); coordinates(pw.binom:klua:<tag>) } replaces the old in-house POM/scm/license blocks.
  • Signing toggle. signingUseGpg=true (CI) switches the signing extension to useGpgCmd(); locally it falls back to in-memory PGP keys from signingInMemoryKey{,Id,Password,IsBase64} (or the legacy binom.gpg.* properties).
  • Source-set wiring. The dead pw.binom.publish.dependsOn(mask, to) helper (from the removed binom-publish plugin) is replaced with a standard sourceSets.matching { ... }.configureEach { dependsOn(...) } block — same semantics for the linux/androidNative/mingw/macos POSIX family.
  • buildSrc cleanup. Dropped pw.binom:binom-publish:0.1.23, org.jetbrains.dokka:dokka-gradle-plugin:1.9.20, and the now-orphaned pw.binom.plugins.HttpServerTask + io.vertx:vertx-web:4.2.1.

Workflow

  • New .github/workflows/release.yml (tag-triggered on N.N.N*).
  • ubuntu-latest + Temurin OpenJDK 21 (Liberica 21.0.6 trips getgeneric under this project's JNI binding, see project memory).
  • Installs gcc g++ clang mingw-w64, imports the GPG key via printf '%b' + pinentry-mode loopback.
  • Pre-publish test gate: jvmTest linuxX64Test must stay green. Pre-chained with downloadKonanToolchainLinux_arm64, downloadKonanToolchainMingw_x64 so the cross-target JVM host libs have toolchains. The KGP 2.4.20 downloadKonan task itself is skipped (-x downloadKonan) because it hardcodes the legacy asset name; the workflow pre-fetches the correct kotlin-native-prebuilt-linux-x86_64-2.4.20.tar.gz from GitHub releases and unpacks it into ~/.konan/ before gradle runs.
  • publishToMavenCentral is invoked with -PsigningUseGpg=true -Psigning.gnupg.{keyName,passphrase}=… -PmavenCentralUsername=… -PmavenCentralPassword=…. Uses the new Central Portal API (central.sonatype.com), not the legacy s01 staging URL.
  • Old .github/workflows/publish.yml (self-hosted semeru JDK 17) removed.
  • .gitignore now covers build/, .gradle/, buildSrc/{build,.gradle}/, .kotlin/, .idea/, .veai/.

Verified locally

  • ./gradlew help — plugins load clean.
  • ./gradlew tasks --group=publishing — publishToMavenCentral, per-target publishJvmPublicationToMavenCentralRepository / publishLinuxX64PublicationToMavenCentralRepository / publishLinuxArm64… / publishMingwX64… / publishAndroidNative{32,64,X86,X64}…, plus sign*Publication tasks are registered.
  • ./gradlew jvmTest — 44/44 pass.
  • ./gradlew linuxX64Test — 35/35 pass.