Skip to content

build(native-cpu): add publishing config + register in BOM#576

Merged
michalharakal merged 1 commit intodevelopfrom
feature/native-cpu-publishing
Apr 29, 2026
Merged

build(native-cpu): add publishing config + register in BOM#576
michalharakal merged 1 commit intodevelopfrom
feature/native-cpu-publishing

Conversation

@michalharakal
Copy link
Copy Markdown
Contributor

Summary

Layers the publishing setup that PR 1 of the native-FFM rollout (#571) deliberately deferred onto the now-shipped scaffolding + kernels. Downstream consumers (e.g. SKaiNET-transformers via composite build) can now substitute the published coordinates with a local project ref through the same path every other SKaiNET module uses.

Changes

  • skainet-backend-native-cpu/build.gradle.kts — add alias(libs.plugins.vanniktech.mavenPublish) to the plugins block. Auto-derives sk.ainet.core:skainet-backend-native-cpu coordinates from the root group + version + new gradle.properties.
  • skainet-backend-native-cpu/gradle.properties (new) — POM_ARTIFACT_ID=skainet-backend-native-cpu, POM_NAME=skainet native (FFM) CPU kernel provider. Mirrors the convention every other publishable module uses.
  • skainet-bom/build.gradle.kts — add api(project(":skainet-backends:skainet-backend-native-cpu")) alongside the existing backend-api / backend-cpu constraints so BOM consumers get a constrained version without a separate pin.

Test plan

  • ./gradlew :skainet-backends:skainet-backend-native-cpu:publishToMavenLocal -PRELEASE_SIGNING_ENABLED=false -PsignAllPublications=false — publishes sk.ainet.core:skainet-backend-native-cpu-jvm:0.22.0-SNAPSHOT to ~/.m2
  • ./gradlew publishToMavenLocal (full repo) — green, no regressions
  • PR 4's cross-arch CI matrix re-runs on this PR for the native module — confirms publishing didn't break anything per arch

Note on multi-arch packaging

The published JAR carries only the host-arch shared library at native/<os>-<arch>/libskainet_kernels.{so|dylib|dll} — i.e. a JAR published from a Linux x86_64 host has only the .so. Multi-arch fat-JAR aggregation across the PR 4 CI matrix runners is still the deferred follow-up. Consumers on other arches cleanly fall through to Panama priority-50 when the native lib doesn't load.

🤖 Generated with Claude Code

Layers the publishing setup that PR 1 of the native-FFM rollout
deliberately deferred (#571) onto the now-shipped scaffolding +
kernels. Lets downstream consumers pull the native provider through
the same coordinate-driven path the rest of the SKaiNET libraries
use, and lets a composite-build consumer (e.g. SKaiNET-transformers
via includeBuild) substitute the published coordinates with a local
project ref.

Changes:

- skainet-backends/skainet-backend-native-cpu/build.gradle.kts:
  add `alias(libs.plugins.vanniktech.mavenPublish)` to the plugins
  block. The vanniktech plugin auto-derives Maven coordinates from
  the root group (`sk.ainet.core`), version (`VERSION_NAME` —
  currently 0.22.0-SNAPSHOT), and the new gradle.properties below.

- skainet-backends/skainet-backend-native-cpu/gradle.properties: NEW.
  POM_ARTIFACT_ID=skainet-backend-native-cpu and POM_NAME mirroring
  the convention every other publishable module uses.

- skainet-bom/build.gradle.kts: add
  `api(project(":skainet-backends:skainet-backend-native-cpu"))`
  alongside the existing backend-api / backend-cpu constraints, so
  consumers depending on the BOM get a constrained version of the
  native module without adding a separate version pin.

Verification:

- ./gradlew :skainet-backends:skainet-backend-native-cpu:publishToMavenLocal
  -PRELEASE_SIGNING_ENABLED=false -PsignAllPublications=false
  publishes sk.ainet.core:skainet-backend-native-cpu-jvm:0.22.0-SNAPSHOT
  to ~/.m2 alongside the existing backend artifacts.

- ./gradlew publishToMavenLocal (full repo) — green, no regressions
  in the existing modules' publish tasks.

The native module's JAR carries the host-arch shared library at
native/<os>-<arch>/libskainet_kernels.{so|dylib|dll}, so a JAR
published from this build host (linux-x86_64 here) only carries the
linux-x86_64 .so. Multi-arch fat-JAR aggregation across the PR 4
cross-arch CI matrix runners is still deferred — consumers on other
arches cleanly fall back to the priority-50 Panama provider when
the native lib doesn't load.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@michalharakal michalharakal merged commit 9911ba6 into develop Apr 29, 2026
9 of 10 checks passed
@michalharakal michalharakal deleted the feature/native-cpu-publishing branch April 29, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant