-
Notifications
You must be signed in to change notification settings - Fork 1
KMP migration #49
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
Open
yigitozgumus
wants to merge
24
commits into
Trendyol:main
Choose a base branch
from
yigitozgumus:kmp-migration
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.
Open
KMP migration #49
Conversation
This file contains hidden or 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
- Kotlin to 2.1.10 - AGP to 8.7.3 - Hilt to 2.55 - Add compile, target and minSDK to libs.versions.toml
…lugins - Kotlin Multiplatfrom will be used to create KMP project - Compose Multiplatform will be used for creating Compose Multiplatform samples - Android Library must be applied to target library for android
Root `build.gradle.kts` file is a place where we declare but not apply the plugins we want to use inside the project. Declaring here allows us to apply plugins to any/all submodules-projects.
- Defined the module on settings.gradle.kts - Added kotlin multiplatform and compose multiplatform plugins - Added android.application and compose.compiler plugins
- Migrated sample app code to new cmp sample - Refactored Hilt code for DI to Koin
- Added swing dependency - Build Failure due to forgotton android code
…ndroid platforms - This approach helps us to use kmp compatible code between different platforms.
- We first start with declaring a target for the `transmission` and `transmission-test` libraries. These will set up the library usage for ios targets in the future. For the sample app, we similarly need to define the targets we want to show this app to. So we add ios related targets. - For the sample, we want to use the whole sample code in iOS, so we bundle the app code into a Framework by creating a framework for each native type. - However, build now fails. Since we added new ios targets, our commonMain code is not truly Multiplatform. We need to replace java specific code
- We successfully created the iOS sample app. To be able to see our framework code, we also added a build step to the iOS build phases. But our build process still fails. - This error is specific to the transmission Library. Normally creating generic types that don't change doesn't create any issue but for KMP, it is a problem.
- We remove the Generic contract definitions from the `QueryHandler` and `CheckpointHandler` interfaces. With this step, we can successfully build the iOSApp using xCode and see the initially created Hello World screen
- This final commit helps us migrate our Sample app to [[Compose Multiplatform]]. We created `MainViewController` inside `iosMain`. Then we created `UIViewControllerRepresentable` and on `makeUiViewController`, we call the controller function we defined in iosMain.- We also need to call the initKoin function to make DI setup work- Lastly, we update info.plist for iOS simulator related error.
- Move the code - Create the iOS app - Bind the Framework code and add a ViewController
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.
This MR partially completes the KMP migration. Build logic and publishing logic will follow.