Skip to content

Add test cases and emulator testing in CI#39

Merged
colemancda merged 20 commits intoPureSwift:masterfrom
swift-android-sdk:master
Mar 25, 2026
Merged

Add test cases and emulator testing in CI#39
colemancda merged 20 commits intoPureSwift:masterfrom
swift-android-sdk:master

Conversation

@marcprux
Copy link
Contributor

@marcprux marcprux commented Mar 10, 2026

This PR adds a single test case and augments the GitHub CI workflow to invoke the new skip android test --apk flag to perform emulator testing with the library embedded with an .apk file (which enables calling Java functions).

In the test case we add a accessor for AndroidApp.Application.currentApplication(), which uses the swift-android-native low-level AndroidContext.application context accessor (added in swift-android-sdk/swift-android-native#6) and wraps it in the swift-java-bridged AndroidApp.Application. The test case then performs some rudimentary testing on it.

An open question is whether to promote these accessor extensions to the corresponding AndroidApp.Application and AndroidContent.Context packages, or if there is some other preferred way of doing this.

@marcprux marcprux marked this pull request as ready for review March 25, 2026 01:36
@marcprux
Copy link
Contributor Author

Ready for review, @colemancda

@colemancda colemancda merged commit 815159f into PureSwift:master Mar 25, 2026
4 checks passed
@colemancda
Copy link
Member

@marcprux I think adding convenience accessors for AndroidApp.Application.currentApplication() that uses the code we built in NDK package is a good idea. Feel free to open a PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants