This guide covers how to integrate GutenbergKit into the WordPress mobile apps. WordPress-iOS and WordPress-Android are the primary consumers of GutenbergKit.
Related repositories:
GutenbergKit can be integrated using different methods depending on your development workflow. Choose the method that best fits your current needs.
Use case: Simultaneous development on both GutenbergKit and a WordPress app.
This method is ideal when you're actively making changes to GutenbergKit and need to see them immediately in the WordPress app.
In your Package.swift dependencies array, use a local path reference:
.package(path: "../GutenbergKit")Make sure the path points to your local GutenbergKit clone relative to your WordPress-iOS project.
- Copy
local-builds.gradle-exampletolocal-builds.gradle - Uncomment the
localGutenbergKitPathline and set it to your local GutenbergKit path:localGutenbergKitPath = "../GutenbergKit"
- Run Gradle sync — this substitutes the Maven dependency with the local project
Use case: Testing specific GutenbergKit commits before any release.
This method is useful for testing pull requests or in-progress work that hasn't been released yet.
Use a revision dependency in Package.swift:
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", revision: "<commit-hash>")Important: When using a revision dependency, the JavaScript build output must be committed to that revision. Run make build in GutenbergKit and commit the changes before referencing the commit hash. This is required until CI infrastructure is in place to automate JavaScript builds.
In gradle/libs.versions.toml, use the PR number and commit hash format:
gutenberg-kit = '<PR-number>-<commit-hash>'For example:
gutenberg-kit = '283-3110b008df0edceac04a1c6f18724476ce67b3ce'CI (Buildkite) publishes builds for PRs to the Maven repository automatically.
Use case: Integrating GutenbergKit work into WordPress app trunk before a formal release.
Pre-releases create alpha version tags without creating a GitHub Release. They're useful for getting changes into the WordPress apps' main branches early.
From the GutenbergKit repository:
make release VERSION_TYPE=prepatch # 0.13.2 -> 0.13.3-alpha.0Available version types:
prepatch— increments patch and adds alpha suffix (0.13.2 → 0.13.3-alpha.0)preminor— increments minor and adds alpha suffix (0.13.2 → 0.14.0-alpha.0)premajor— increments major and adds alpha suffix (0.13.2 → 1.0.0-alpha.0)prerelease— increments the alpha number (0.13.3-alpha.0 → 0.13.3-alpha.1)
This pushes a git tag (e.g., v0.13.3-alpha.0) and CI publishes the Android build to the Maven repository.
Use an exact version in Package.swift:
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", exact: "0.13.3-alpha.0")In gradle/libs.versions.toml:
gutenberg-kit = '0.13.3-alpha.0'Use case: Stable releases with grouped changes for production.
Formal releases create a GitHub Release with auto-generated release notes and are used for WordPress app releases.
From the GutenbergKit repository:
make release VERSION_TYPE=patch # 0.13.2 -> 0.13.3Available version types:
patch— bug fixes and minor changes (0.13.2 → 0.13.3)minor— new features, backwards compatible (0.13.2 → 0.14.0)major— breaking changes (0.13.2 → 1.0.0)
This creates a GitHub Release with auto-generated notes and CI publishes the Android build to the Maven repository.
Use a from version in Package.swift:
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.13.3")In gradle/libs.versions.toml:
gutenberg-kit = '0.13.3'| Scenario | Recommended Method |
|---|---|
| Active feature development | Local Development |
| PR review / testing | Git Revision |
| Merging to WordPress app trunk | Pre-release |
| WordPress app release | Formal Release |
Package.swiftis at the repository root (not in theios/directory)- Use
revisionfor commit hashes,exactfor pre-release tags,fromfor stable releases - JavaScript build output must be committed when using revision dependencies
- CI (Buildkite) publishes builds to the Maven repository
- PR builds use
<PR-number>-<commit-hash>format - Local development uses Gradle's
includeBuildwith dependency substitution