feat: enable CoreGraphics polyfill on Android#15
Merged
Conversation
Adds os(Android) alongside os(WASI) and os(Linux) to every gate that selects the pure-Swift CoreGraphics polyfill. The polyfill is Foundation only, so it works on Android without further changes; this just opts the platform in so downstream packages (GoodNotes' SVGToNotesItems, CommonNLI) can build for Android the same way they already build for WASI/Linux. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
ZheYuLee
approved these changes
Jun 26, 2026
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.
Summary
Extends every
#if os(WASI) || os(Linux)gate inSource/andTests/to also includeos(Android)so the pure-Swift CoreGraphics polyfill is selected on Android. The polyfill is Foundation-only — no platform-specific code — so the same path that's been working for WASI/Linux works on Android with no further changes.Why: downstream packages (
GoodNotes/CanvasKit'sSVGToNotesItems,CommonNLI's SVG conversion) need this to build on Android. Until now, anywhere that importsSVGToNotesItemseither had to#if canImport(SVGToNotesItems)guard the call site or exclude itself from the Android build graph.Tagged as
0.2.0-goodnotes.Test plan
swift buildon Apple unchanged (CoreGraphics path still used).swift buildon WASI/Linux unchanged (polyfill path still used).CanvasKit/CanvasKitAndroidDemo now succeeds withSVGToNotesItemslinked.🤖 Generated with Claude Code