Skip to content

Commit efb38f5

Browse files
feat[notifications, clientCharges]: DB flow to room database (#2728)
* feat[notifications, clientCharges]: DB flow to room database * fix: clientChargeRepositoryImpl test * fix: module name, entity name * fix: Dependency Guard * fix: Database Implementation * fix: Fix Test & Lint Issue --------- Co-authored-by: Sk Niyaj Ali <[email protected]>
1 parent 0297116 commit efb38f5

File tree

83 files changed

+2403
-1977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2403
-1977
lines changed

androidApp/build.gradle.kts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,6 @@
99
*/
1010
import org.mifos.mobile.dynamicVersion
1111

12-
/*
13-
* Copyright 2024 Mifos Initiative
14-
*
15-
* This Source Code Form is subject to the terms of the Mozilla Public
16-
* License, v. 2.0. If a copy of the MPL was not distributed with this
17-
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
18-
*
19-
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md
20-
*/
2112
plugins {
2213
alias(libs.plugins.mifos.android.application)
2314
alias(libs.plugins.mifos.android.application.compose)
@@ -84,7 +75,7 @@ dependencies {
8475
implementation(projects.core.common)
8576
implementation(projects.core.model)
8677
implementation(projects.core.data)
87-
implementation(projects.core.datastore)
78+
implementation(projects.core.database)
8879
implementation(projects.core.ui)
8980
implementation(projects.core.designsystem)
9081

@@ -132,7 +123,6 @@ dependencies {
132123
implementation(libs.androidx.profileinstaller)
133124
implementation(libs.google.oss.licenses)
134125
implementation(libs.androidx.multidex)
135-
implementation(libs.dbflow)
136126

137127
testImplementation(projects.core.testing)
138128
testImplementation(libs.hilt.android.testing)

androidApp/dependencies/releaseRuntimeClasspath.tree.txt

Lines changed: 1121 additions & 1073 deletions
Large diffs are not rendered by default.

androidApp/dependencies/releaseRuntimeClasspath.txt

Lines changed: 152 additions & 139 deletions
Large diffs are not rendered by default.

androidApp/src/main/kotlin/org/mifos/mobile/MifosSelfServiceApp.kt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ package org.mifos.mobile
1212
import androidx.multidex.MultiDex
1313
import androidx.multidex.MultiDexApplication
1414
import com.google.firebase.crashlytics.FirebaseCrashlytics
15-
import com.raizlabs.android.dbflow.config.FlowManager
1615
import dagger.hilt.android.HiltAndroidApp
1716
import org.mifos.mobile.core.datastore.PreferencesHelper
1817
import org.mifos.mobile.feature.settings.applySavedTheme
@@ -22,13 +21,7 @@ class MifosSelfServiceApp : MultiDexApplication() {
2221
override fun onCreate() {
2322
super.onCreate()
2423
MultiDex.install(this)
25-
FlowManager.init(this)
26-
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true)
24+
FirebaseCrashlytics.getInstance().isCrashlyticsCollectionEnabled = true
2725
PreferencesHelper(this).applySavedTheme()
2826
}
29-
30-
override fun onTerminate() {
31-
super.onTerminate()
32-
FlowManager.destroy()
33-
}
3427
}

androidApp/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,4 +654,5 @@
654654
<string name="s_no">S.No</string>
655655
<string name="no_transaction_found">No Transaction Found</string>
656656
<string name="not_connected">⚠️ You aren’t connected to the internet</string>
657+
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">AIzaSyBbeT2BaMWLj-lReCgYoNmXs_TIyRLr9qQ</string>
657658
</resources>

build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class AndroidApplicationConventionPlugin : Plugin<Project> {
2020
apply("com.dropbox.dependency-guard")
2121
apply("mifos.detekt.plugin")
2222
apply("mifos.spotless.plugin")
23-
apply("mifos.ktlint.plugin")
2423
apply("mifos.git.hooks")
2524
}
2625

build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
11

2-
import org.mifos.mobile.libs
32
import org.gradle.api.Plugin
43
import org.gradle.api.Project
54
import org.gradle.kotlin.dsl.dependencies
5+
import org.mifos.mobile.libs
66

77
class AndroidHiltConventionPlugin : Plugin<Project> {
88
override fun apply(target: Project) {
99
with(target) {
10-
with(pluginManager) {
11-
apply("dagger.hilt.android.plugin")
12-
// KAPT must go last to avoid build warnings.
13-
// See: https://stackoverflow.com/questions/70550883/warning-the-following-options-were-not-recognized-by-any-processor-dagger-f
14-
apply("org.jetbrains.kotlin.kapt")
10+
pluginManager.apply("com.google.devtools.ksp")
11+
dependencies {
12+
"ksp"(libs.findLibrary("hilt.compiler").get())
1513
}
1614

17-
dependencies {
18-
"implementation"(libs.findLibrary("hilt.android").get())
19-
"kapt"(libs.findLibrary("hilt.compiler").get())
20-
"kaptAndroidTest"(libs.findLibrary("hilt.compiler").get())
21-
"kaptTest"(libs.findLibrary("hilt.compiler").get())
15+
// Add support for Jvm Module, base on org.jetbrains.kotlin.jvm
16+
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
17+
dependencies {
18+
"implementation"(libs.findLibrary("hilt.core").get())
19+
}
20+
}
21+
22+
/** Add support for Android modules, based on [AndroidBasePlugin] */
23+
pluginManager.withPlugin("com.android.base") {
24+
pluginManager.apply("dagger.hilt.android.plugin")
25+
dependencies {
26+
"implementation"(libs.findLibrary("hilt.android").get())
27+
}
2228
}
2329
}
2430
}

build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
1919
apply("mifos.android.lint")
2020
apply("mifos.detekt.plugin")
2121
apply("mifos.spotless.plugin")
22-
apply("mifos.ktlint.plugin")
2322
}
2423

2524
extensions.configure<LibraryExtension> {

build-logic/convention/src/main/kotlin/AndroidRoomConventionPlugin.kt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1+
2+
13
import androidx.room.gradle.RoomExtension
4+
import com.google.devtools.ksp.gradle.KspExtension
25
import org.gradle.api.Plugin
36
import org.gradle.api.Project
47
import org.gradle.kotlin.dsl.configure
58
import org.gradle.kotlin.dsl.dependencies
69
import org.mifos.mobile.libs
710

811
class AndroidRoomConventionPlugin : Plugin<Project> {
9-
1012
override fun apply(target: Project) {
1113
with(target) {
1214
pluginManager.apply("androidx.room")
1315
pluginManager.apply("com.google.devtools.ksp")
1416

17+
extensions.configure<KspExtension> {
18+
arg("room.generateKotlin", "true")
19+
}
20+
1521
extensions.configure<RoomExtension> {
1622
// The schemas directory contains a schema file for each version of the Room database.
1723
// This is required to enable Room auto migrations.
@@ -20,9 +26,9 @@ class AndroidRoomConventionPlugin : Plugin<Project> {
2026
}
2127

2228
dependencies {
23-
add("implementation", libs.findLibrary("room.runtime").get())
24-
add("implementation", libs.findLibrary("room.ktx").get())
25-
add("ksp", libs.findLibrary("room.compiler").get())
29+
"implementation"(libs.findLibrary("androidx.room.runtime").get())
30+
"implementation"(libs.findLibrary("androidx.room.ktx").get())
31+
"ksp"(libs.findLibrary("androidx.room.compiler").get())
2632
}
2733
}
2834
}

build-logic/convention/src/main/kotlin/org/mifos/mobile/AndroidCompose.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package org.mifos.mobile
33
import com.android.build.api.dsl.CommonExtension
44
import org.gradle.api.Project
55
import org.gradle.api.provider.Provider
6-
import org.gradle.kotlin.dsl.assign
76
import org.gradle.kotlin.dsl.configure
87
import org.gradle.kotlin.dsl.dependencies
98
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
@@ -50,8 +49,7 @@ internal fun Project.configureAndroidCompose(
5049
.relativeToRootProject("compose-reports")
5150
.let(reportsDestination::set)
5251

53-
stabilityConfigurationFile = rootProject.layout.projectDirectory.file("compose_compiler_config.conf")
54-
55-
enableStrongSkippingMode = true
52+
stabilityConfigurationFiles
53+
.add(isolated.rootProject.projectDirectory.file("compose_compiler_config.conf"))
5654
}
5755
}

0 commit comments

Comments
 (0)