-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compose Multiplatform Support #1208
Draft
blakelee
wants to merge
15
commits into
main
Choose a base branch
from
blakelee/kmp-compose
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+5,085
−560
Conversation
This file contains 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
…e regular compose package * Add UI tests for iOS
* jdk target 8 issue is occurring so this is a progress commit
…view and View related items
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ow-ui:common-core * Fix some lint issues
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Overview
This pull request add Kotlin Multiplatform (KMP) support for the
workflow-ui:compose
module. Some of the most notable changes are thebuild.gradle.kts
configurations and changing/adding targets e.g.androidMain
vsmain
Note that this PR also uses a commit from @MilanJovic92 #1185. The bulk of this PR is simply copying that module over. The changes I made will cut the PR size in half.
All of the iOS target UI tests pass. Tests that contained Android code (View and Dialog) were removed for iOS but retained for Android.
The Compose samples have also been update to support iOS. Due to some limitations, the samples that use the Preview aren't shown as well any that used Android specific code. All of the Android code works the same as before.
While not tested, this should also work for Desktop and JS 🎉
Considerations
:workflow-ui:compose-multiplatform
From here
1.9.24
which is higher than what we had before. This is due to needing Jetbrains version of lifecycle which just recently released in May 2024.EDIT: It looks like the above may not be true after getting this message from the KMP team here JetBrains/compose-multiplatform#5047 (comment)
Todo
compose-ui-tooling
package needs to be updated for KMP support but can be done pretty triviallyHere is a demo of the compose-samples working
Simulator.Screen.Recording.-.iPhone.15.-.2024-06-28.at.13.47.18.mp4
Notes
Some UI tests are failing due to an issue with LeakCanary and Google. See here. The issue is fixed with Lifecycle 2.8.2 but Jetbrains hasn't updated their version of Lifecycle to match it.