Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.class

# Generated files
.kotlin/
bin/
gen/
out/
Expand Down
47 changes: 45 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ espressoCoreVersion = "3.6.0-alpha01"
gradle = "8.3.1"
hiltCompiler = "2.48.1"
hiltNavigationComposeVersion = "1.2.0"
kotlin = "2.0.0"
kotlin = "2.1.0"
compose = "1.5.4"
compose-material3 = "1.1.2"
androidx-activityCompose = "1.8.0"
kotlinStdlibJdk8 = "1.7.20"
lifecycleViewmodelKtx = "2.8.1"
compose-plugin = "1.6.10"
multiplatformSettings = "1.0.0"
navigationCompose = "2.7.7"
navigationComposeVersion = "2.7.0-alpha07"
dagger-hilt = "2.48.1"
Expand All @@ -31,6 +30,13 @@ appcompatVersion = "1.7.0"
testng = "6.9.6"
monitor = "1.6.1"
runnerVersion = "1.5.2"
koin = "4.0.1-RC1"
protobuf = "4.26.0"
protobufPlugin = "0.9.4"
kotlinxSerializationJson = "1.7.3"
multiplatformSettings = "1.2.0"
kotlinxCoroutines = "1.9.0"
gradle-plugin = "8.2.0"

[libraries]
android-maven-gradle-plugin = { module = "com.github.dcendents:android-maven-gradle-plugin", version.ref = "androidMavenGradlePlugin" }
Expand Down Expand Up @@ -68,6 +74,36 @@ testng = { group = "org.testng", name = "testng", version.ref = "testng" }
androidx-monitor = { group = "androidx.test", name = "monitor", version.ref = "monitor" }
runner = { group = "androidx.test", name = "runner", version.ref = "runnerVersion" }

protobuf-kotlin-lite = { group = "com.google.protobuf", name = "protobuf-kotlin-lite", version.ref = "protobuf" }

kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" }

jb-kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }

kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinxSerializationJson" }

multiplatform-settings = { group = "com.russhwolf", name = "multiplatform-settings-no-arg", version.ref = "multiplatformSettings" }
multiplatform-settings-coroutines = { group = "com.russhwolf", name = "multiplatform-settings-coroutines", version.ref = "multiplatformSettings" }
multiplatform-settings-serialization = { group = "com.russhwolf", name = "multiplatform-settings-serialization", version.ref = "multiplatformSettings" }

kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }

kotlinx-coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "kotlinxCoroutines" }

protobuf-protoc = { group = "com.google.protobuf", name = "protoc", version.ref = "protobuf" }

koin-compose = { group = "io.insert-koin", name = "koin-compose", version.ref = "koin" }
koin-compose-viewmodel = { group = "io.insert-koin", name = "koin-compose-viewmodel", version.ref = "koin" }

android-gradle-plugin = { module = "com.android.tools.build:gradle", version.ref = "gradle-plugin" }
gradle-plugin-development = { module = "org.gradle:gradle-plugin-development", version.ref = "gradle-plugin" }

androidx-compose-ui = { group = "androidx.compose.ui", name = "ui" }
androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" }
androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" }
androidx-compose-material-iconsExtended = { group = "androidx.compose.material", name = "material-icons-extended" }
compose-gradlePlugin = { group = "org.jetbrains.kotlin", name = "compose-compiler-gradle-plugin", version.ref = "kotlin" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
Expand All @@ -78,3 +114,10 @@ kotlinCocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref =
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
dagger-hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger-hilt" }
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }

protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }

kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

mifospay-cmp-feature = { id = "mifospay.cmp.feature", version = "unspecified" }
2 changes: 1 addition & 1 deletion mifos-passcode/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/build
/build
6 changes: 6 additions & 0 deletions mifos-passcode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# :feature:passcode module
## Dependency graph
![Dependency graph](../docs/images/graphs/dep_graph_feature_passcode.svg)
# :libs:mifos-passcode module
## Dependency graph
![Dependency graph](../../docs/images/graphs-kmp/dep_graph_libs_mifos_passcode.svg)
90 changes: 0 additions & 90 deletions mifos-passcode/build.gradle

This file was deleted.

105 changes: 105 additions & 0 deletions mifos-passcode/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*
* Copyright 2024 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
plugins {
alias(libs.plugins.mifospay.cmp.feature)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.protobuf)
}

android {
namespace = "com.mifos.library.passcode"
}

kotlin {
sourceSets {
commonMain.dependencies {
implementation(compose.ui)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.materialIconsExtended)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)

implementation(libs.koin.compose.viewmodel)
implementation(libs.koin.compose)

implementation(libs.jb.kotlin.stdlib)
implementation(libs.kotlin.reflect)

api(libs.protobuf.kotlin.lite)
implementation(libs.kotlinx.serialization.core)

implementation(libs.multiplatform.settings)
implementation(libs.multiplatform.settings.serialization)
implementation(libs.multiplatform.settings.coroutines)

implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.core)
Copy link
Member

Choose a reason for hiding this comment

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

@meetjain6091 what ever dependency you added below implementation(libs.kotlinx.serialization.core) is not neccessary because all of them are already added in the CMPFeatureConventionPlugin

Choose a reason for hiding this comment

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

@HekmatullahAmin We don't have that plugin in this repo and we have to configure build-logic here which is lot of works and that's not necessary since it requires few dependencies .

That's why we're recommended him to manually include those dependencies directly on library Gradle file.


implementation(project(":core:ui"))
implementation(project(":core:designsystem"))
implementation(project(":core:data"))

implementation(libs.findLibrary("jb.composeRuntime").get())
implementation(libs.findLibrary("jb.composeViewmodel").get())

Choose a reason for hiding this comment

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

Include these dependencies like above for e.g
implementation(libs.jb.composeRuntime) check their name version catalog (libs.version.toml)

implementation(libs.findLibrary("jb.lifecycleViewmodel").get())
implementation(libs.findLibrary("jb.lifecycleViewmodelSavedState").get())
implementation(libs.findLibrary("jb.savedstate").get())
implementation(libs.findLibrary("jb.bundle").get())
implementation(libs.findLibrary("jb.composeNavigation").get())
implementation(libs.findLibrary("kotlinx.collections.immutable").get())
}

androidMain.dependencies {
implementation(libs.findLibrary("androidx.lifecycle.runtimeCompose").get())
implementation(libs.findLibrary("androidx.lifecycle.viewModelCompose").get())
implementation(libs.findLibrary("androidx.tracing.ktx").get())

implementation(platform(libs.findLibrary("koin-bom").get()))
implementation(libs.findLibrary("koin-android").get())
implementation(libs.findLibrary("koin.androidx.compose").get())
implementation(libs.findLibrary("koin.android").get())
implementation(libs.findLibrary("koin.androidx.navigation").get())
implementation(libs.findLibrary("koin.androidx.compose").get())
implementation(libs.findLibrary("koin.core.viewmodel").get())
}

androidInstrumentedTest.dependencies {
implementation(libs.findLibrary("androidx.navigation.testing").get())
implementation(libs.findLibrary("androidx.compose.ui.test").get())
implementation(libs.findLibrary("androidx.lifecycle.runtimeTesting").get())
}

androidTest.dependencies {
implementation(libs.findLibrary("koin.test.junit4").get())
}

desktopMain.dependencies {
implementation(libs.kotlinx.coroutines.swing)
}
}
}

// Setup protobuf configuration, generating lite Java and Kotlin classes
protobuf {

Choose a reason for hiding this comment

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

Remove this protobuf block of code, not required

protoc {
artifact = libs.protobuf.protoc.get().toString()
}
generateProtoTasks {
all().forEach { task ->
task.builtins {
register("kotlin") {
option("lite")
}
}
}
}
}
21 changes: 0 additions & 21 deletions mifos-passcode/proguard-rules.pro

This file was deleted.

13 changes: 13 additions & 0 deletions mifos-passcode/src/androidMain/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2024 Mifos Initiative

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.

See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.VIBRATE" />
</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
34 changes: 34 additions & 0 deletions mifos-passcode/src/commonMain/composeResources/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2024 Mifos Initiative

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.

See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
-->
<resources>
<string name="lib_mifos_passcode_title">Passcode will be reset, are you sure?</string>
<string name="lib_mifos_passcode_cancel">Cancel</string>
<string name="lib_mifos_passcode_yes">Yes</string>
<string name="lib_mifos_passcode_pref_name">Passcode</string>
<string name="lib_mifos_passcode_has_passcode">hasPasscode</string>
<string name="lib_mifos_passcode_has_drag_passcode">hasDragPasscode</string>
<string name="lib_mifos_passcode">passcode</string>
<string name="lib_mifos_passcode_drag_passcode">drag_passcode</string>

<string name="library_mifos_passcode_create_passcode">Create Passcode</string>
<string name="library_mifos_passcode_confirm_passcode">Confirm Passcode</string>
<string name="library_mifos_passcode_enter_your_passcode">Enter your Passcode</string>
<string name="library_mifos_passcode_forgot_passcode">Forgot Passcode</string>
<string name="library_mifos_passcode_delete_passcode">Delete Passcode Key Button</string>
<string name="library_mifos_passcode_drag_guide">Drag your finger here only in one direction.</string>
<string name="library_mifos_passcode_drag_your_pattern">Drag your Pattern</string>
<string name="library_mifos_passcode_exit">Exit</string>
<string name="library_mifos_passcode_skip">Skip</string>
<string name="library_mifos_passcode_login_manually">Forgot Passcode, Login Manually</string>
<string name="library_mifos_passcode_try_again">Try again</string>
<string name="library_mifos_passcode_do_not_match">Passcode do not match!</string>
<string name="library_mifos_passcode_exit_message">Are you sure you want to exit?</string>
</resources>
Loading