Skip to content

Draft: report migrate to cmp #2392

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
wants to merge 22 commits into
base: kmp-impl
Choose a base branch
from
Open

Conversation

kapmaurya
Copy link
Contributor

Fixes - Jira-#Issue_Number

Didn't create a Jira ticket, click here to create new.

Please Add Screenshots If there are any UI changes.

Before After

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the static analysis check ./gradlew check or ci-prepush.sh to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

//// PermissionBox(
//// requiredPermissions = if (Build.VERSION.SDK_INT >= 33) {
//// listOf(Manifest.permission.READ_MEDIA_IMAGES)
//// } else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't comment it use expect/actual for it we need to take permission from user for accessing to their storage. for the logic of taking permission use expect/actual do the implementation only for android now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently facing some challenges in migrating the permission logic using expect/actual. could guide me through the expected structure or share a reference implementation to help me proceed correctly.

Copy link
Contributor

@HekmatullahAmin HekmatullahAmin Jun 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kapmaurya i can't fully provide you the code but we can use expect/actual for any logic: (function, composable function, variables...).

  • look at below code in kmp-project-template how we handle the colorScheme cause the dynamic theme is only for android so we they made expect/acutal and different implementation for each platform.
@Composable
expect fun colorScheme(useDarkTheme: Boolean, dynamicColor: Boolean): ColorScheme
expect fun getPlatform(): Platform

enum class Platform {
    Android,
    Desktop,
    IOS,
    JS,
    Wasm,
}

expect fun supportsDynamicTheming(): Boolean

@therajanmaurya therajanmaurya marked this pull request as ready for review June 5, 2025 16:41
Copy link

@revanthkumarJ revanthkumarJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kapmaurya don't add anything to libs.toml i think every required thing is added already,
if in any particul;ar case you are using any different librarie for kmp include it only.

Remove auto generated wild card <*>
Don't comment previews

@revanthkumarJ
Copy link

@kapmaurya status of this?

kapmaurya and others added 15 commits June 11, 2025 17:12
# Conflicts:
#	cmp-navigation/src/commonMain/kotlin/cmp/navigation/di/KoinModules.kt
#	core/designsystem/src/commonMain/kotlin/com/mifos/core/designsystem/component/MifosTextFieldDropdown.kt
#	settings.gradle.kts
# Conflicts:
#	cmp-navigation/src/commonMain/kotlin/cmp/navigation/di/KoinModules.kt
#	core/designsystem/src/commonMain/kotlin/com/mifos/core/designsystem/component/MifosTextFieldDropdown.kt
#	settings.gradle.kts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants