Skip to content
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 #35

Merged
merged 21 commits into from
Sep 6, 2024
Merged

Compose Multiplatform support #35

merged 21 commits into from
Sep 6, 2024

Conversation

pisoj
Copy link
Contributor

@pisoj pisoj commented Jun 16, 2024

Introduces support for Compose Multiplatform projects. The library and the sample app are both migrated to support Android, iOS, Desktop (Windows, macOS, Linux) and the Web via kotlin/wasm.

As a result of this migration the project is now using Kotlin 2.0.0. I manually tested every platform except linux. All instrumented tests also pass. I ran spotlessApply and fixed all the issues, but for some reason it keeps making the App function in /sample/composeApp/commonMain/kotlin/App.kt private and I have not found a way to fix that (it still does the same when I run ./gradlew spotlessApply).

I also do not know anything about publishing a library, so that part is untested, but generating documentation works.

To run on any desktop platform:

./gradlew :sample:composeApp:run

To run on web:

./gradlew :sample:composeApp:wasmJsRun

closes #30
closes #31
closes #34

Windows

2024-06-16_202404

Web

2024-06-16_203121

macOS

Screenshot 2024-06-16 at 19 13 38

iOS

Simulator Screenshot - iPhone 15 Pro - 2024-06-16 at 19 16 21

Android

Screenshot_20240616_190738

@pushpalroy
Copy link
Owner

This looks great! 💯 Thanks for raising this PR. Let me review this.

@N7ghtm4r3
Copy link

N7ghtm4r3 commented Jul 15, 2024

Hi, any updates on this PR?

@pushpalroy
Copy link
Owner

Working on reviewing the code and getting this merged asap.

@N7ghtm4r3
Copy link

Thank you!

@pushpalroy pushpalroy added enhancement New feature or request experimental Something that is experimental labels Jul 29, 2024
@070hm
Copy link

070hm commented Aug 14, 2024

Thank you so much for this PR! I really needed a timeline feature in my desktop app, and this is going to save me a lot of time.

@abdallahmehiz
Copy link

Amazing work

@armond-avanes
Copy link

Great job! Is there any ETA for when the PR is going to be merged?

@pushpalroy
Copy link
Owner

Great job! Is there any ETA for when the PR is going to be merged?

This PR should be merged by this month and a KMP library will be released.

@pushpalroy pushpalroy changed the base branch from main to migrate_to_multiplatform September 4, 2024 13:48
@pushpalroy pushpalroy self-assigned this Sep 4, 2024
# Conflicts:
#	.idea/deploymentTargetSelector.xml
#	.idea/kotlinc.xml
#	gradle/libs.versions.toml
#	gradle/wrapper/gradle-wrapper.properties
#	sample/composeApp/src/commonMain/kotlin/Home.kt
#	sample/composeApp/src/commonMain/kotlin/timelines/BasicDashedTimeLine.kt
- fix merge conflict while updating PR to migrate library to kmm
- bump kotlin to 2.0.20
- bump gradle to 8.10
- bump agp to 8.5.2
# Conflicts:
#	.gitignore
#	.idea/deploymentTargetSelector.xml
#	.idea/gradle.xml
#	.idea/kotlinc.xml
- downgrade kotlin to 2.0.20-RC2
- bump activityCompose to 1.9.1
- bump compose-plugin to 1.6.11
- bump dokka to 1.9.20
- bump androidxTest to 1.6.2
@pushpalroy pushpalroy changed the base branch from migrate_to_multiplatform to main September 4, 2024 19:29
@pushpalroy
Copy link
Owner

Great job! Is there any ETA for when the PR is going to be merged?

This PR should be merged by this month and a KMP library will be released.

The library has been migrated to KMP now and released with version 3.0.0 in the same artifact! 🚀
The library can now be used in Android, iOS, Desktop, and WASM projects! ⚡

A huge shoutout to @pisoj for raising this PR and doing the heavy lifting! 👏🏻 👏🏻

This PR will be merged now and the ReadMe will be updated with migration details.
Thanks to everyone who is using this library, please provide your feedback and raise issues if needed.

@pushpalroy pushpalroy merged commit 9919603 into pushpalroy:main Sep 6, 2024
4 checks passed
@N7ghtm4r3
Copy link

Thank you so much for the porting and this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request experimental Something that is experimental
Projects
None yet
6 participants