-
Notifications
You must be signed in to change notification settings - Fork 37
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
Kotlin Native support #19
Comments
Hi @sebleclerc. We don't have any immediate need for Kotlin Native support internally at Streem, so if you wanted to contribute it that would be very appreciated. I'd suggest you take a look at the existing PR for Kotlin Native support that was done against the A few other tips:
|
@garyp Native support is essential for our usage of KMP, so that's why I want to contribute. Thanks for pointing that PR! For sure I'll have a look and probably base a few things on this. I like the idea of the Pure Kotlin approach. I will evaluate it. Keeping the way it is will limit the number of changed files. For sure I will want to add the As per the Gradle plugin, do you know how much work it involves and the time required? If it's not that much of a deal, it can be really interesting to move forward with newer ways of KMP. For sure the sooner it's done, the less work it involves 😄 |
@sebleclerc We haven't looked yet at the effort involved to switch to the new gradle plugin. But I have played with it on other KMP projects and it doesn't seem like it'd be a huge effort. I'm pretty busy with other projects until around late April. But if you're ready to work on Kotlin Native support and this is a blocker for you, I'll find some time to update to the new |
@garyp Alright! Thanks, I’ll keep you posted. |
@garyp I did got the PR into my fork. I ran current conformance to make sure everything was working and I had 3 tests that weren't: Can you confirm that these are also not working on your side ? Thanks |
@garyp Also, I might be blocked by the multiplatform plugin. Not sure ... but when I try to build the This is my build.gradle for now
|
If I run the conformance tests using |
@sebleclerc Regarding the kotlinx-serialization error you're getting, your dependency should be on Also, you might need to update
|
I tried with both. I'll try and clone from the streem repo. But one thing I just saw if that a |
Also, I did:
Those dependencies just work fine inside |
Yes, a newer version of protobuf can definitely report new failures since protobuf is constantly expanding the conformance tests with every release. That's why the I'll also try running the tests with 3.11.4 and see if I get these new failures. If so, then these are probably conformance bugs we'll want to fix. |
I did bump the project to gradle 5.3 but since then I can't build ( and I did a test on a fresh clone from the main streem repo and I have the same error when syncing with gradle: |
From what I read here ( link ) this is the new way of setting a project for Kotlin multiplatform. We define project where they each have their Is that what you meant @garyp when you talked about updating the multiplatform plugin? I don't mind digging into this if this will help me with the native support of pbandk. Also, if this is the case, do you mind moving on to using |
@sebleclerc I didn't quite understand what that link was talking about. When I was referring to updating the multiplatform plugin, I was talking about setting up the project to follow the structure described at https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html. If you want to dig into updating pbandk to use that new structure (and plugin), we'll gladly accept a PR.
Sounds great 👍 |
@sebleclerc I was able to get everything building (haven't tried actually running this code yet...) with a newer gradle version. First I ran diff --git a/build.gradle b/build.gradle
index 56e43cc..78828b5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -72,12 +72,12 @@ project(':runtime:runtime-js') {
project(':runtime:runtime-jvm') {
apply plugin: 'kotlin-platform-jvm'
apply plugin: 'kotlinx-serialization'
- sourceCompatibility = '1.6'
+ sourceCompatibility = '1.8'
compileKotlin {
- kotlinOptions.jvmTarget = '1.6'
+ kotlinOptions.jvmTarget = '1.8'
}
compileTestKotlin {
- kotlinOptions.jvmTarget = '1.6'
+ kotlinOptions.jvmTarget = '1.8'
}
dependencies {
expectedBy project(':runtime:runtime-common') I think we should be ok updating the |
I was also able to get everything to build (again, haven't tried running the code) with gradle 6.2.2 (the latest release in the 6.x series). If you're going to be changing the entire gradle project structure, you might as well update to gradle 6.2.2. |
That is exactly what I’m doing right now. I’m fairly advanced right now. I hope to have a PR in the next day or 2 |
Oh and after updating Gradle I forgot to update wrapper 🤦♂️ that might be why it wasn’t working |
You can see PR #29 |
Originally based on cretz/pb-and-k#15. This is a rebase of #29 onto the latest version of master. Fixes #19.
Hi there!
I'm really looking forward to use pbandk for my Kotlin Multiplatform project, but it's coming short of Kotlin Native support. I'm willing to dig into this but first I wanted to know if any of you (contributors) have any tip or advance regarding what will be required to implement? Or anything I that could be helpful to me?
Thanks!
The text was updated successfully, but these errors were encountered: