Skip to content
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

Feat: Migrate :core:designsystem to KMP #2746

Merged
merged 10 commits into from
Jan 17, 2025
17 changes: 16 additions & 1 deletion androidApp/dependencies/demoDebugRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ androidx.vectordrawable:vectordrawable-animated:1.1.0
androidx.vectordrawable:vectordrawable:1.1.0
androidx.versionedparcelable:versionedparcelable:1.1.1
androidx.viewpager:viewpager:1.0.0
androidx.window.extensions.core:core:1.0.0
androidx.window:window:1.2.0
app.cash.turbine:turbine-jvm:1.1.0
app.cash.turbine:turbine:1.1.0
co.touchlab:kermit-android-debug:2.0.4
Expand All @@ -139,7 +141,12 @@ co.touchlab:stately-concurrent-collections-jvm:2.1.0
co.touchlab:stately-concurrent-collections:2.1.0
co.touchlab:stately-strict-jvm:2.1.0
co.touchlab:stately-strict:2.1.0
com.arkivanov.essenty:back-handler-android:2.1.0
com.arkivanov.essenty:back-handler:2.1.0
com.arkivanov.essenty:utils-internal-android:2.1.0
com.arkivanov.essenty:utils-internal:2.1.0
com.caverock:androidsvg-aar:1.4
com.google.accompanist:accompanist-drawablepainter:0.36.0
com.google.accompanist:accompanist-pager:0.34.0
com.google.accompanist:accompanist-permissions:0.34.0
com.google.android.gms:play-services-ads-identifier:18.0.0
Expand Down Expand Up @@ -193,8 +200,12 @@ com.squareup.okio:okio-jvm:3.9.1
com.squareup.okio:okio:3.9.1
com.squareup.retrofit2:converter-gson:2.11.0
com.squareup.retrofit2:retrofit:2.11.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform-android:0.5.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform:0.5.0
dev.chrisbanes.snapper:snapper:0.2.2
io.coil-kt.coil3:coil-android:3.0.4
io.coil-kt.coil3:coil-compose-core-android:3.0.4
io.coil-kt.coil3:coil-compose-core:3.0.4
io.coil-kt.coil3:coil-core-android:3.0.4
io.coil-kt.coil3:coil-core:3.0.4
io.coil-kt.coil3:coil-network-core-android:3.0.4
Expand Down Expand Up @@ -255,10 +266,15 @@ org.jetbrains.compose.animation:animation-core:1.7.0-rc01
org.jetbrains.compose.animation:animation:1.7.0-rc01
org.jetbrains.compose.annotation-internal:annotation:1.7.3
org.jetbrains.compose.collection-internal:collection:1.7.3
org.jetbrains.compose.components:components-resources-android:1.7.0-rc01
org.jetbrains.compose.components:components-resources:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview-android:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview:1.7.0-rc01
org.jetbrains.compose.foundation:foundation-layout:1.7.0-rc01
org.jetbrains.compose.foundation:foundation:1.7.0-rc01
org.jetbrains.compose.material3:material3:1.7.0-rc01
org.jetbrains.compose.material:material-icons-core:1.7.0-rc01
org.jetbrains.compose.material:material-icons-extended:1.7.0-rc01
org.jetbrains.compose.material:material-ripple:1.7.0-rc01
org.jetbrains.compose.material:material:1.7.0-rc01
org.jetbrains.compose.runtime:runtime-saveable:1.7.0-rc01
Expand All @@ -272,7 +288,6 @@ org.jetbrains.compose.ui:ui-util:1.7.0-rc01
org.jetbrains.compose.ui:ui:1.7.0-rc01
org.jetbrains.kotlin:kotlin-android-extensions-runtime:2.1.0
org.jetbrains.kotlin:kotlin-parcelize-runtime:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22
org.jetbrains.kotlin:kotlin-stdlib:2.1.0
Expand Down
17 changes: 16 additions & 1 deletion androidApp/dependencies/demoReleaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ androidx.vectordrawable:vectordrawable-animated:1.1.0
androidx.vectordrawable:vectordrawable:1.1.0
androidx.versionedparcelable:versionedparcelable:1.1.1
androidx.viewpager:viewpager:1.0.0
androidx.window.extensions.core:core:1.0.0
androidx.window:window:1.2.0
app.cash.turbine:turbine-jvm:1.1.0
app.cash.turbine:turbine:1.1.0
co.touchlab:kermit-android:2.0.4
Expand All @@ -134,7 +136,12 @@ co.touchlab:stately-concurrent-collections-jvm:2.1.0
co.touchlab:stately-concurrent-collections:2.1.0
co.touchlab:stately-strict-jvm:2.1.0
co.touchlab:stately-strict:2.1.0
com.arkivanov.essenty:back-handler-android:2.1.0
com.arkivanov.essenty:back-handler:2.1.0
com.arkivanov.essenty:utils-internal-android:2.1.0
com.arkivanov.essenty:utils-internal:2.1.0
com.caverock:androidsvg-aar:1.4
com.google.accompanist:accompanist-drawablepainter:0.36.0
com.google.accompanist:accompanist-pager:0.34.0
com.google.accompanist:accompanist-permissions:0.34.0
com.google.android.gms:play-services-ads-identifier:18.0.0
Expand Down Expand Up @@ -188,8 +195,12 @@ com.squareup.okio:okio-jvm:3.9.1
com.squareup.okio:okio:3.9.1
com.squareup.retrofit2:converter-gson:2.11.0
com.squareup.retrofit2:retrofit:2.11.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform-android:0.5.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform:0.5.0
dev.chrisbanes.snapper:snapper:0.2.2
io.coil-kt.coil3:coil-android:3.0.4
io.coil-kt.coil3:coil-compose-core-android:3.0.4
io.coil-kt.coil3:coil-compose-core:3.0.4
io.coil-kt.coil3:coil-core-android:3.0.4
io.coil-kt.coil3:coil-core:3.0.4
io.coil-kt.coil3:coil-network-core-android:3.0.4
Expand Down Expand Up @@ -250,10 +261,15 @@ org.jetbrains.compose.animation:animation-core:1.7.0-rc01
org.jetbrains.compose.animation:animation:1.7.0-rc01
org.jetbrains.compose.annotation-internal:annotation:1.7.3
org.jetbrains.compose.collection-internal:collection:1.7.3
org.jetbrains.compose.components:components-resources-android:1.7.0-rc01
org.jetbrains.compose.components:components-resources:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview-android:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview:1.7.0-rc01
org.jetbrains.compose.foundation:foundation-layout:1.7.0-rc01
org.jetbrains.compose.foundation:foundation:1.7.0-rc01
org.jetbrains.compose.material3:material3:1.7.0-rc01
org.jetbrains.compose.material:material-icons-core:1.7.0-rc01
org.jetbrains.compose.material:material-icons-extended:1.7.0-rc01
org.jetbrains.compose.material:material-ripple:1.7.0-rc01
org.jetbrains.compose.material:material:1.7.0-rc01
org.jetbrains.compose.runtime:runtime-saveable:1.7.0-rc01
Expand All @@ -267,7 +283,6 @@ org.jetbrains.compose.ui:ui-util:1.7.0-rc01
org.jetbrains.compose.ui:ui:1.7.0-rc01
org.jetbrains.kotlin:kotlin-android-extensions-runtime:2.1.0
org.jetbrains.kotlin:kotlin-parcelize-runtime:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22
org.jetbrains.kotlin:kotlin-stdlib:2.1.0
Expand Down
17 changes: 16 additions & 1 deletion androidApp/dependencies/prodDebugRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ androidx.vectordrawable:vectordrawable-animated:1.1.0
androidx.vectordrawable:vectordrawable:1.1.0
androidx.versionedparcelable:versionedparcelable:1.1.1
androidx.viewpager:viewpager:1.0.0
androidx.window.extensions.core:core:1.0.0
androidx.window:window:1.2.0
app.cash.turbine:turbine-jvm:1.1.0
app.cash.turbine:turbine:1.1.0
co.touchlab:kermit-android-debug:2.0.4
Expand All @@ -139,7 +141,12 @@ co.touchlab:stately-concurrent-collections-jvm:2.1.0
co.touchlab:stately-concurrent-collections:2.1.0
co.touchlab:stately-strict-jvm:2.1.0
co.touchlab:stately-strict:2.1.0
com.arkivanov.essenty:back-handler-android:2.1.0
com.arkivanov.essenty:back-handler:2.1.0
com.arkivanov.essenty:utils-internal-android:2.1.0
com.arkivanov.essenty:utils-internal:2.1.0
com.caverock:androidsvg-aar:1.4
com.google.accompanist:accompanist-drawablepainter:0.36.0
com.google.accompanist:accompanist-pager:0.34.0
com.google.accompanist:accompanist-permissions:0.34.0
com.google.android.gms:play-services-ads-identifier:18.0.0
Expand Down Expand Up @@ -193,8 +200,12 @@ com.squareup.okio:okio-jvm:3.9.1
com.squareup.okio:okio:3.9.1
com.squareup.retrofit2:converter-gson:2.11.0
com.squareup.retrofit2:retrofit:2.11.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform-android:0.5.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform:0.5.0
dev.chrisbanes.snapper:snapper:0.2.2
io.coil-kt.coil3:coil-android:3.0.4
io.coil-kt.coil3:coil-compose-core-android:3.0.4
io.coil-kt.coil3:coil-compose-core:3.0.4
io.coil-kt.coil3:coil-core-android:3.0.4
io.coil-kt.coil3:coil-core:3.0.4
io.coil-kt.coil3:coil-network-core-android:3.0.4
Expand Down Expand Up @@ -255,10 +266,15 @@ org.jetbrains.compose.animation:animation-core:1.7.0-rc01
org.jetbrains.compose.animation:animation:1.7.0-rc01
org.jetbrains.compose.annotation-internal:annotation:1.7.3
org.jetbrains.compose.collection-internal:collection:1.7.3
org.jetbrains.compose.components:components-resources-android:1.7.0-rc01
org.jetbrains.compose.components:components-resources:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview-android:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview:1.7.0-rc01
org.jetbrains.compose.foundation:foundation-layout:1.7.0-rc01
org.jetbrains.compose.foundation:foundation:1.7.0-rc01
org.jetbrains.compose.material3:material3:1.7.0-rc01
org.jetbrains.compose.material:material-icons-core:1.7.0-rc01
org.jetbrains.compose.material:material-icons-extended:1.7.0-rc01
org.jetbrains.compose.material:material-ripple:1.7.0-rc01
org.jetbrains.compose.material:material:1.7.0-rc01
org.jetbrains.compose.runtime:runtime-saveable:1.7.0-rc01
Expand All @@ -272,7 +288,6 @@ org.jetbrains.compose.ui:ui-util:1.7.0-rc01
org.jetbrains.compose.ui:ui:1.7.0-rc01
org.jetbrains.kotlin:kotlin-android-extensions-runtime:2.1.0
org.jetbrains.kotlin:kotlin-parcelize-runtime:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22
org.jetbrains.kotlin:kotlin-stdlib:2.1.0
Expand Down
17 changes: 16 additions & 1 deletion androidApp/dependencies/prodReleaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ androidx.vectordrawable:vectordrawable-animated:1.1.0
androidx.vectordrawable:vectordrawable:1.1.0
androidx.versionedparcelable:versionedparcelable:1.1.1
androidx.viewpager:viewpager:1.0.0
androidx.window.extensions.core:core:1.0.0
androidx.window:window:1.2.0
app.cash.turbine:turbine-jvm:1.1.0
app.cash.turbine:turbine:1.1.0
co.touchlab:kermit-android:2.0.4
Expand All @@ -134,7 +136,12 @@ co.touchlab:stately-concurrent-collections-jvm:2.1.0
co.touchlab:stately-concurrent-collections:2.1.0
co.touchlab:stately-strict-jvm:2.1.0
co.touchlab:stately-strict:2.1.0
com.arkivanov.essenty:back-handler-android:2.1.0
com.arkivanov.essenty:back-handler:2.1.0
com.arkivanov.essenty:utils-internal-android:2.1.0
com.arkivanov.essenty:utils-internal:2.1.0
com.caverock:androidsvg-aar:1.4
com.google.accompanist:accompanist-drawablepainter:0.36.0
com.google.accompanist:accompanist-pager:0.34.0
com.google.accompanist:accompanist-permissions:0.34.0
com.google.android.gms:play-services-ads-identifier:18.0.0
Expand Down Expand Up @@ -188,8 +195,12 @@ com.squareup.okio:okio-jvm:3.9.1
com.squareup.okio:okio:3.9.1
com.squareup.retrofit2:converter-gson:2.11.0
com.squareup.retrofit2:retrofit:2.11.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform-android:0.5.0
dev.chrisbanes.material3:material3-window-size-class-multiplatform:0.5.0
dev.chrisbanes.snapper:snapper:0.2.2
io.coil-kt.coil3:coil-android:3.0.4
io.coil-kt.coil3:coil-compose-core-android:3.0.4
io.coil-kt.coil3:coil-compose-core:3.0.4
io.coil-kt.coil3:coil-core-android:3.0.4
io.coil-kt.coil3:coil-core:3.0.4
io.coil-kt.coil3:coil-network-core-android:3.0.4
Expand Down Expand Up @@ -250,10 +261,15 @@ org.jetbrains.compose.animation:animation-core:1.7.0-rc01
org.jetbrains.compose.animation:animation:1.7.0-rc01
org.jetbrains.compose.annotation-internal:annotation:1.7.3
org.jetbrains.compose.collection-internal:collection:1.7.3
org.jetbrains.compose.components:components-resources-android:1.7.0-rc01
org.jetbrains.compose.components:components-resources:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview-android:1.7.0-rc01
org.jetbrains.compose.components:components-ui-tooling-preview:1.7.0-rc01
org.jetbrains.compose.foundation:foundation-layout:1.7.0-rc01
org.jetbrains.compose.foundation:foundation:1.7.0-rc01
org.jetbrains.compose.material3:material3:1.7.0-rc01
org.jetbrains.compose.material:material-icons-core:1.7.0-rc01
org.jetbrains.compose.material:material-icons-extended:1.7.0-rc01
org.jetbrains.compose.material:material-ripple:1.7.0-rc01
org.jetbrains.compose.material:material:1.7.0-rc01
org.jetbrains.compose.runtime:runtime-saveable:1.7.0-rc01
Expand All @@ -267,7 +283,6 @@ org.jetbrains.compose.ui:ui-util:1.7.0-rc01
org.jetbrains.compose.ui:ui:1.7.0-rc01
org.jetbrains.kotlin:kotlin-android-extensions-runtime:2.1.0
org.jetbrains.kotlin:kotlin-parcelize-runtime:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-common:2.1.0
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22
org.jetbrains.kotlin:kotlin-stdlib:2.1.0
Expand Down
51 changes: 35 additions & 16 deletions core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
plugins {
alias(libs.plugins.mifos.android.library)
alias(libs.plugins.mifos.android.library.compose)
alias(libs.plugins.mifos.kmp.library)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.roborazzi)
}

android {
Expand All @@ -19,19 +21,36 @@ android {
namespace = "org.mifos.mobile.core.designsystem"
}

dependencies {
api(libs.androidx.compose.ui)
api(libs.androidx.compose.foundation)
api(libs.androidx.compose.foundation.layout)
api(libs.androidx.compose.material.iconsExtended)
api(libs.androidx.compose.material3)
api(libs.androidx.compose.runtime)
api(libs.androidx.compose.ui.util)
api(libs.androidx.activity.compose)

// Accompanist Pager Library
implementation(libs.accompanist.pager)
kotlin {
sourceSets {
androidMain.dependencies {
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.androidx.activity.compose)
implementation(projects.core.model)
}
androidInstrumentedTest.dependencies {
implementation(libs.androidx.compose.ui.test)
}
androidUnitTest.dependencies {
implementation(libs.androidx.compose.ui.test)
}
commonMain.dependencies {
implementation(libs.coil.kt.compose)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.materialIconsExtended)
implementation(compose.ui)
implementation(compose.uiUtil)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
api(libs.back.handler)
api(libs.window.size)
}
}
}

testImplementation(libs.androidx.compose.ui.test)
androidTestImplementation(libs.androidx.compose.ui.test)
compose.resources {
publicResClass = true
generateResClass = always
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.components
package org.mifos.mobile.core.designsystem.component

import androidx.annotation.StringRes
import androidx.compose.foundation.BorderStroke
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.components
package org.mifos.mobile.core.designsystem.component

import androidx.compose.foundation.Image
import androidx.compose.foundation.isSystemInDarkTheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.components
package org.mifos.mobile.core.designsystem.component
niyajali marked this conversation as resolved.
Show resolved Hide resolved

import androidx.compose.foundation.layout.Row
import androidx.compose.material3.RadioButton
Expand All @@ -17,7 +17,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme
import org.mifos.mobile.designsystem.theme.MifosMobileTheme

@Composable
fun MifosRadioButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.components
package org.mifos.mobile.core.designsystem.component

import androidx.annotation.StringRes
import androidx.compose.foundation.layout.PaddingValues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.components
package org.mifos.mobile.core.designsystem.component

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.isSystemInDarkTheme
Expand All @@ -29,7 +29,7 @@ import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.TextFieldValue
import androidx.compose.ui.tooling.preview.Preview
import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme
import org.mifos.mobile.designsystem.theme.MifosMobileTheme

@Composable
fun MifosSearchTextField(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.components
package org.mifos.mobile.core.designsystem.component

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.components
package org.mifos.mobile.core.designsystem.component

import androidx.annotation.StringRes
import androidx.compose.foundation.isSystemInDarkTheme
Expand All @@ -22,7 +22,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import org.mifos.mobile.core.designsystem.icons.MifosIcons
import org.mifos.mobile.designsystem.icon.MifosIcons

@OptIn(ExperimentalMaterial3Api::class)
@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
*/
package org.mifos.mobile.core.designsystem.icons
package org.mifos.mobile.core.designsystem.icon

import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
Expand Down
Loading
Loading