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.
This PR adds support for building and testing on Android. It mostly just adds
#if os(Android)checks and some Android-specific fixes for things likeerrnoandO_SYNC, which are implemented differently in Bionic than Linux/Musl.Android does require swift-system 1.5+, so I made the dependency
upToNextMajorfrom "1.3.0" rather thanupToNextMinor. If that presents an issue, we could probably finagle some mechanism for having different swift-system version requirements based on the platform.Test cases are run with swift-android-action, which installs the Android SDK and runs the test cases on an Android emulator. Some of the tests that expect hard-coded file paths had to be disabled because the Android emulator doesn't have access to the local filesystem. This could potentially be resolved by copying the necessary files, but would require re-working all the
#filePathreferences to use either relative paths, or accept some sort of override file root (perhaps based on an environment variable), and seemed like it would be a more intrusive change than would be warranted.