-
Notifications
You must be signed in to change notification settings - Fork 6
migrate to KMP #89
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
migrate to KMP #89
Conversation
5a40f71 to
6275cf9
Compare
|
I haven't set up the publishing part; as I lack knowledge of the maven-central publishing. I've also kept both nexus and vanniktech publishing plugins in |
snappdevelopment
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it took me a while to review your changes. I checked out your branch and tried to run everything. I came across a couple of issues:
- I tried to run the desktop app from the gutter icon, which doesn't seem to work. Maybe it's a tooling issue, but it also throws an exception that it can't find
androidx/collection/ScatterMapKt. However running the app with./gradlew runworks. - When I try to scroll the json in the desktop app it doesn't work and prints an IndexOutOfBoundsException.
- I am not sure how to run the iOS app. I will have to look into that. Were you able to run it on your machine?
- I can't run the UI tests. If I do
./gradlew :composeApp:connectedAndroidTestlike the docs say, it tells me:Cannot locate tasks that match ':composeApp:connectedAndroidTest' as project 'composeApp' not found in root project 'JsonTree'.. Do we need to move the tests to the sample package where the actual app is?
The sample app also has a couple of styling issues, but I can fix that later
jsontree/src/commonMain/kotlin/com/sebastianneubauer/jsontree/JsonTreeParser.kt
Outdated
Show resolved
Hide resolved
| instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test) | ||
| @OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
| compilerOptions { | ||
| jvmTarget.set(JvmTarget.JVM_1_8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to remove either androidTarget. compilerOptions or jvmToolchain block below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove androidTarget. compilerOptions
cfe4f79 to
1cfc948
Compare
|
I'm sorry for missing your questions earlier. Went straight to the requested changes 😅
For me, running from the gutter icon is working. This is the command being used when running from the gutter icon
I'm getting no such exception on the Desktop or any other platform.
I've added
Running Android Tests from
Let me know how I can help. |
It looks like Zac Sweers got the same exception in a Compose Multiplatform project, but it seems like there is no solution. Since running the command works, that's fine for me.
Thanks for adding it. I also tried that but I couldn't configure my run config correctly, because my MacOS and Xcode are too old. I tried it on a different Mac and it worked.
That's unfortunate, but okay. One more question: |
|
Yes, I'm getting the same "compileOnly dependency" warnings.. but according to this Kotlin/kotlinx-atomicfu#448 issue, they are harmless. |
|
I will go ahead and merge this now. I will do some more adjustments to the sample and CI and then try to publish the new version. Thanks for contributing 👍 |
|
@ShreyashKore I just released a new snapshot version. Can you confirm if it works for you? The version is |
|
It's working on jvmDesktop (mac os) and Android. On IOS, it's giving me some errors... Not sure if it's something with the library or the fact that I'm using an experimental version of Compose... I will try to pinpoint the issue and will attach the stack traces. I'm unable to run from Android studio so these logs are from Xcode. |
|
Yes, it seems like it's a compatibility issue with the pre-release version of Compose. The iOS app worked for me, so I googled the error and saw that other people had similar problems. They were able to fix it by using a compatible Compose version. |
|
Yup... I just checked on a fresh project with Kotlin "2.0.20" and compose 1.6.11 and it is working fine. Finally, I can use it in my project :) Again thanks for this amazing project 👍 |
closes #88