Open
Conversation
Gutenberg build assets (HTML, CSS, JS) now live in a dedicated `GutenbergKitResources` SPM target instead of being bundled directly inside `GutenbergKit`. This separation enables a future XCFramework distribution strategy where consumers can pull pre-built resources from CDN via `DependencyMode.release`, while developers continue building from source with `.local`. Key changes: - `Package.swift` gains `DependencyMode` enum and the new `GutenbergKitResources` target/product - `GutenbergKit` target sets `packageAccess: false` and drops `package` access modifiers (now `internal`) - `EditorViewController` and `HTMLPreviewManager` import `GutenbergKitResources` instead of using `Bundle.module` - `Makefile` copies dist to the new location via `copy-dist-ios` / `copy-dist-android` sub-targets - CI `test-swift-package` step uses `make` instead of bare `swift test` (needs dist assets in place) - Tracked build output under `ios/Sources/GutenbergKit/Gutenberg/` is deleted (~18 MB); `make build` regenerates into `ios/Sources/GutenbergKitResources/Gutenberg/` --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 17, 2026
mokagio
commented
Mar 17, 2026
mokagio
commented
Mar 17, 2026
They'll be introduced later on. Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
mokagio
commented
Mar 17, 2026
We'll stop tracking them once the XCFramework is in place.
Avoids a redundant JS build + translation fetch by downloading the `dist.tar.gz` artifact already produced by the `build-react` step. --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Extracts Gutenberg build assets (HTML, CSS, JS) into a dedicated
GutenbergKitResourcesSPM target.This is a subset of #318. I realized the release process needs some tweaking to support atomic version bump + XCFramework build. To avoid #318 staying in flight even longer and to begin testing the setup in the day to day development workflow, I though we should at least merge the introduction of the resources framework without the XCFramework implementation. I wish I thought of this sooner...
Why?
This separation is the architectural prerequisite for distributing pre-built resources as an XCFramework via CDN.
Splitting it out now keeps the diff small and reviewable; the XCFramework build/release automation will follow in a separate PR.
How?
Package.swiftgains aDependencyModeenum (.local/.release) and the newGutenbergKitResourcestarget + productGutenbergKitdepends onGutenbergKitResources, setspackageAccess: false, and drops allpackageaccess modifiers →internalEditorViewControllerandHTMLPreviewManagerimportGutenbergKitResourcesinstead of usingBundle.moduledirectlyMakefilecopies dist to the new location viacopy-dist-ios/copy-dist-androidsub-targetstest-swift-packagestep usesmake test-swift-packageinstead of bareswift test(needs dist assets in place)ios/Sources/GutenbergKit/Gutenberg/is deleted (~18 MB);make buildregenerates intoios/Sources/GutenbergKitResources/Gutenberg/Testing Instructions
make build— verify dist is copied toios/Sources/GutenbergKitResources/Gutenberg/swift build— compiles without errorsswift test— all 471 unit tests passmake build-swift-package— xcodebuild succeedsAccessibility Testing Instructions
N/A — no UI changes.
Screenshots or screencast
N/A — infrastructure change only.
Posted by Claude (Opus 4.6) on behalf of @mokagio with approval.