-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add Kotlin Multiplatform support #9179
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
Add Kotlin Multiplatform support #9179
Conversation
|
Would you like me to take a look at this, or wait until Rafael is back? |
Please have a look, besides introducing Kotlin Multiplatform (KMP), this is mainly organizing the project and changing namespaces. The modules, that have been changed to KMP, where already prepared to work with KMP, I just didn't change them officially yet. |
…android configuration
32ddde8 to
0e0cd19
Compare
kewisch
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.
This looks good to me from a high level perspective. As noted I think we should add some documentation on our KMP approach so people getting started with namespacing know what to expect.
Final review should be up to @rafaeltonholo
|
|
||
| android { | ||
| namespace = "net.thunderbird.core.contact" | ||
| namespace = "net.thunderbird.core.android.contact" |
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.
So this means this is an android-specific module example? I think we need to have some documentation on when to use android in the package name, and at what level. Otherwise I guess we'll have a mix of some namespaces being with android and some being without.
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.
Yes, it contains only android specific code, hence the package name. I'm preparing a documentation for the overall structure.
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.
I want to understand more about this. Does that mean all the modules with android will be Android only and won't go to KMP? Or is it just to identify that the modules with android in their package are still not KMP compatible?
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.
The modules under core:android are using Android in some way, hence they have been moved there to separate them from pure JVM modules.
The JVM modules are easily convertible to KMP, while the Android ones require further work to either establish an expect/actual setup or adding proper interfaces for platform agnostic code. This has not be done yet, but should be done at some point in the future.
So it should help to identify them as not KMP compatible yet.
|
|
||
| android { | ||
| namespace = "net.thunderbird.core.contact" | ||
| namespace = "net.thunderbird.core.android.contact" |
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.
I want to understand more about this. Does that mean all the modules with android will be Android only and won't go to KMP? Or is it just to identify that the modules with android in their package are still not KMP compatible?
core/testing/src/commonMain/kotlin/assertk/assertions/TurbineExtensions.kt
Show resolved
Hide resolved
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.
nice!
...er/api/src/commonMain/kotlin/net/thunderbird/feature/mail/folder/api/SpecialFolderUpdater.kt
Show resolved
Hide resolved
|
We also need to create a root |
…ccount:storage:legacy
…me for folder related entities Moves folder related entities there and remove :core:mail:folder:api
0e0cd19 to
f3436f0
Compare
Thanks, I'll think this could be a separate task. I'll check Spotless, too. |
rafaeltonholo
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.
Great work on this PR! I'm excited to see KMP in our project!
Resolves #9178
This provides a first Kotlin Multiplatform project setup and converts the modules under
coreto Kotlin Multiplatform. Modules undercore:androidandcore:uihave been skipped due to complexity of the change.As a side effect the namespace has been changed to
net.thunderbird.Modules related to folder handling have been moved to feature to clean up core from feature specific modules.