pokekotlin
pokekotlin copied to clipboard
Publish idiomatic packages for non-Kotlin / non-Gradle usage
- [x] Java-friendly API on the JVM Maven package
- [ ] Swift package for apple native builds
- [x] NPM package with TS declarations for JS
- [ ] C headers for native builds? Investigate packaging conventions here
- [x] WASM package isn't possible due to
@JsExportrestrictions.
Summary from some AI-assisted research:
KMP Library Multiplatform Release Plan
-
What to publish:
- JS: ESM NPM package
- WASM: ESM NPM package (with
.wasmand glue JS) - Apple: XCFramework ZIP for all Apple targets
- Native (Linux/Windows):
.so/.dll+ C headers (for C/C++ FFI)
-
Where to publish:
- JS/WASM: npmjs.com (separate or combined packages; wrapper package for runtime selection if needed)
- Apple: Host XCFramework ZIP (e.g. GitHub Releases), reference in a
Package.swiftin a Git repo for SPM - Native: GitHub Releases (or Conan/vcpkg for C/C++ users)
-
Tools needed:
- Gradle (KMP, jgitver for versioning)
- npm-publish plugins
- (Optional) multiplatform-swiftpackage for SPM
- Conan/vcpkg for C/C++ packaging
- CI for building, publishing, and automating manifest/version updates
-
Release process changes:
- Trigger release on main branch (not on tag)
- Build/publish all artifacts
- Update SPM
Package.swiftwith correct versioned URL/checksum - Commit and tag the manifest repo as the final step