fix: Fixed Desktop Build & Added Firebase App Distribution (#1816)

* Feat: KMP Library Setup (#1766)

* Migrating from hilt to koin (This) (#1764)

* Migrating from hilt to koin

* Fixed Instance creation error

* refactor: Removed Hilt and migrated to Koin

This commit removes Hilt and migrates the project to Koin for dependency injection.

The following
 changes were made:

- Removed the `AndroidHiltConventionPlugin`.
- Added the `AndroidKoinConventionPlugin`.
- Updated dependencies to use Koin.
- Updated KSP configuration for Koin.
- Updated feature modules to use Koin.
- Updated common modules to use Koin
.
- Removed Hilt annotations and replaced them with Koin annotations.
- Updated ViewModels to use Koin for dependency injection.
- Updated modules to use Koin for dependency injection.

* Formatted Dependencies

* migrating from hilt to koin clean up commit

* Revert "migrating from hilt to koin clean up commit"

This reverts commit bb63058e49.

---------

Co-authored-by: Sk Niyaj Ali <niyaj639@gmail.com>

* Feat: KMP Library Setup

---------

Co-authored-by: Nagarjuna <99315689+Nagarjuna0033@users.noreply.github.com>

* Feat: [:core:model] - Migrated to KMM (#1770)

* Feat: [:core:common] KMP Migration (#1768)

* Feat: [:core:common] KMP Migration

* Updated Usage Declaration

* Feat: [:core:datastore] - Migrated to KMP (#1769)

* Feat: [:core:network] - Migrated to KMP (#1772)

* Feat: [:core:network] - Migrated to KMP

* Feat: [:core:data] - Migrated to KMP Library

* Feat: [:core:designsystem] - Migrated to KMP with CMP Library (#1774)

* Feat: [:core:ui] - Migrated to KMP with CMP Library (#1775)

* Feat: [:feature:auth] - Migrated to Kotlin Multiplatform (#1782)

* Feat: [:feature:auth] - Migrated to Kotlin Multiplatform

* Added Support For Web

* Feat: Migrated Passcode Module to KMP (#1783)

* Feat: Migrated Home Module to KMP (#1784)

* Feat: Migrated Edit Password Module to KMP (#1787)

* Feat: Migrated FAQ module to kmp (#1786)

* Feat: Migrated Settings Module to KMP (#1785)

* Feat: Migrated Profile Module to KMP (#1788)

* Feat: Migrated History Module to KMP (#1790)

* Feat: Migrated Payments Module to KMP (#1791)

* Feat: Migrated Finance Module to KMP (#1792)

* Feat: Migrated Accounts Module to KMP (#1793)

* Feat: Migrated Accounts Module to KMP

* Updated README.md

* Update README.md

* Feat: Migrated Invoices Module to KMP (#1794)

* Feat: Migrated KYC Module to KMP (#1798)

* Migrated Notification Module to KMP (#1799)

* Feat: Migrated KYC Module to KMP

* Feat: Migrated Notification Module to KMP

* Feat: Migrated Saved Card Module to KMP (#1800)

* Feat: Migrated Receipt Module to KMP (#1801)

* fix: Ios Build (#1802)

* Feat: Migrated SI Module to KMP (#1803)

* Feat: Migrated Request Money Module to KMP (#1807)

* Feat: Migrated Send Money Module to KMP (#1808)

* Feat: Migrated Make Transfer Module to KMP (#1809)

* Feat: Migrated QR Module to KMP (#1810)

* Feat: Migrated UPI Setup Module to KMP (#1811)

* Feat: Final Clean-up For KMP (#1812)

* Feat: Final Cleanup For KMP

* Update README.md

* Update EditPassword README.md

* Update FAQ README.md

* Update Finance README.md

* Update History README.md

* Update Home README.md

* Update Invoice README.md

* Update KYC README.md

* Update Make Transfer README.md

* Update Notification README.md

* Update Payments README.md

* Update Profile README.md

* Update Saved Card README.md

* Update Send Money README.md

* Update Settings README.md

* Update SI README.md

* Migrating from hilt to koin (This) (#1764)

* Migrating from hilt to koin

* Fixed Instance creation error

* refactor: Removed Hilt and migrated to Koin

This commit removes Hilt and migrates the project to Koin for dependency injection.

The following
 changes were made:

- Removed the `AndroidHiltConventionPlugin`.
- Added the `AndroidKoinConventionPlugin`.
- Updated dependencies to use Koin.
- Updated KSP configuration for Koin.
- Updated feature modules to use Koin.
- Updated common modules to use Koin
.
- Removed Hilt annotations and replaced them with Koin annotations.
- Updated ViewModels to use Koin for dependency injection.
- Updated modules to use Koin for dependency injection.

* Formatted Dependencies

* migrating from hilt to koin clean up commit

* Revert "migrating from hilt to koin clean up commit"

This reverts commit bb63058e49.

---------

Co-authored-by: Sk Niyaj Ali <niyaj639@gmail.com>

* Profile UI redesign  (#1767)

* Refactor Profile UI

* Fixed Build Issue

* Profile UI Bug Fix & Improvement

* added placeholder for  when uri is null

cleanup

fix spotless test failure

* Fix - CI Build Issue

---------

Co-authored-by: Sk Niyaj Ali <niyaj639@gmail.com>

* refactor: Redesign payment screen (#1773)

* refactor: Redesign payment screen

* resolved detekt error

* refactor : changed current theme instead of using NewUi

* resolved spotless errors

* refactor: Redesign finance screen (#1777)

* refactor: Redesign payment screen

* resolved detekt error

* refactor : changed current theme instead of using NewUi

* resolved spotless errors

* refactor: Redesign finance screen UI

* resolved spotless errors

* resolved conflicts

* changed structure of accounts screen

* refactor padding values in finance screen

* fix: dark theme colors (#1789)

* fix: dark theme colors

* fixed edit icon tint

* Fix invoice api (#1797)

* Redesign requeset screen UI

* fix MissingKoinDefinitionException

* removed comments and fixed share qr code bug

* fix: Invoice APIs

* update readme file (#1804)

* update readme file

* update readme file

* update readme file with how to contribute

* Add branch policy (#1805)

* update readme file

* update readme file

* update readme file with how to contribute

* update readme file with how to contribute

* update readme file with branch Policy

---------

Co-authored-by: Rajan Maurya <therajanmaurya@users.noreply.github.com>

* Migrating from hilt to koin (This) (#1764)

* Migrating from hilt to koin

* Fixed Instance creation error

* refactor: Removed Hilt and migrated to Koin

This commit removes Hilt and migrates the project to Koin for dependency injection.

The following
 changes were made:

- Removed the `AndroidHiltConventionPlugin`.
- Added the `AndroidKoinConventionPlugin`.
- Updated dependencies to use Koin.
- Updated KSP configuration for Koin.
- Updated feature modules to use Koin.
- Updated common modules to use Koin
.
- Removed Hilt annotations and replaced them with Koin annotations.
- Updated ViewModels to use Koin for dependency injection.
- Updated modules to use Koin for dependency injection.

* Formatted Dependencies

* migrating from hilt to koin clean up commit

* Revert "migrating from hilt to koin clean up commit"

This reverts commit bb63058e49.

---------

Co-authored-by: Sk Niyaj Ali <niyaj639@gmail.com>

* Merge kmm-impl to dev

* Update make_site.yaml

* fix: Fixed Desktop Versioning

* - Added Firebase App Distribution

---------

Co-authored-by: Nagarjuna <99315689+Nagarjuna0033@users.noreply.github.com>
Co-authored-by: Rajan Maurya <therajanmaurya@users.noreply.github.com>
Co-authored-by: Pronay Sarker <pronaycoding@gmail.com>
Co-authored-by: kapmaurya <152150716+kapmaurya@users.noreply.github.com>
This commit is contained in:
Sk Niyaj Ali 2024-11-19 22:47:20 +05:30 committed by GitHub
parent 6980ca7c5a
commit 0e0537e6d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
37 changed files with 168 additions and 298 deletions

View File

@ -10,6 +10,9 @@ inputs:
playstore-creds:
description: 'The playstore credentials to inflate'
required: true
firebase-creds:
description: 'The firebase credentials to inflate'
required: true
runs:
using: 'composite'
steps:
@ -38,3 +41,10 @@ runs:
CREDS: ${{ inputs.playstore-creds }}
run: |
echo $CREDS > mifospay-android/playStorePublishServiceCredentialsFile.json
- name: Inflate firebaseAppDistributionServiceCredentialsFile.json
shell: bash
env:
CREDS: ${{ inputs.firebase-creds }}
run: |
echo $CREDS > mifospay-android/firebaseAppDistributionServiceCredentialsFile.json

View File

@ -0,0 +1,13 @@
{
"type": "service_account",
"project_id": "mifoswallet-baa0c",
"private_key_id": "private_key_id",
"private_key": "private_key",
"client_email": "client_email",
"client_id": "111380693391682832489",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-w3hi9%40mifoswallet-baa0c.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}

View File

@ -42,7 +42,7 @@ jobs:
run: ./gradlew packageReleaseDistributionForCurrentOS
app_build:
name: Github, Firebase, and Sentry Release
name: Github, Firebase Release
needs: [ build_desktop_app ]
runs-on: ubuntu-latest
permissions:
@ -76,6 +76,7 @@ jobs:
keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
google-services: ${{ secrets.GOOGLESERVICES }}
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
firebase-creds: ${{ secrets.FIREBASECREDS }}
- uses: ./.github/actions/create-release-notes
name: Create Release Notes
@ -121,6 +122,15 @@ jobs:
./mifospay-desktop/build/compose/binaries/main-release/msi/*.msi
./mifospay-desktop/build/compose/binaries/main-release/deb/*.deb
./mifospay-desktop/build/compose/binaries/main-release/dmg/*.dmg
- name: ☁️ Deploy to Firebase
env:
KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }}
KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }}
KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
run: ./gradlew appDistributionUploadProdRelease --no-configuration-cache
- name: Print `git status`
run: git status
@ -161,6 +171,7 @@ jobs:
keystore: ${{ secrets.UPLOAD_KEYSTORE_FILE }}
google-services: ${{ secrets.GOOGLESERVICES }}
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
firebase-creds: ${{ secrets.FIREBASECREDS }}
- uses: ./.github/actions/create-release-notes
name: Create Release Notes
@ -177,6 +188,12 @@ jobs:
run: |
./gradlew :mifospay-android:bundleRelease
- name: Archive Build
uses: actions/upload-artifact@v4
with:
name: release-aabs
path: ./**/*.aab
- name: Deploy to Playstore Internal
run: bundle exec fastlane deploy_internal

View File

@ -25,7 +25,7 @@ jobs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
@ -46,4 +46,4 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4

View File

@ -64,6 +64,7 @@ jobs:
dependency_guard:
needs: setup
runs-on: ubuntu-latest
@ -100,32 +101,8 @@ jobs:
disable_globbing: true
commit_message: "🤖 Updates baselines for Dependency Guard"
tests_and_lint:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Run tests
run: |
./gradlew :mifospay-android:testDemoDebug
# ./gradlew testDemoDebug :lint:test :mifospay-android:lintProdRelease :lint:lint
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-and-lint-reports
path: |
**/build/reports/lint-results-*.html
**/build/test-results/test*UnitTest/**.xml
build:
needs: [ checks, dependency_guard, tests_and_lint ]
needs: [ checks, dependency_guard ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -145,11 +122,11 @@ jobs:
- name: Upload APKs
uses: actions/upload-artifact@v4
with:
name: APKs
name: Android APKs
path: '**/build/outputs/apk/**/*.apk'
build_desktop_app:
needs: [ checks, dependency_guard, tests_and_lint ]
needs: [ checks, dependency_guard ]
strategy:
matrix:
os:
@ -174,7 +151,7 @@ jobs:
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: Windows-App
name: Windows-Apps
path: |
./mifospay-desktop/build/compose/binaries/main/exe/*.exe
./mifospay-desktop/build/compose/binaries/main/msi/*.msi
@ -183,12 +160,12 @@ jobs:
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: Windows-App
name: Linux-App
path: './mifospay-desktop/build/compose/binaries/main/deb/*.deb'
- name: Upload MacOS App
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: Windows-App
name: MacOS-App
path: './mifospay-desktop/build/compose/binaries/main/dmg/*.dmg'

View File

@ -26,6 +26,7 @@ jobs:
keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }}
google-services: ${{ secrets.GOOGLESERVICES }}
playstore-creds: ${{ secrets.PLAYSTORECREDS }}
firebase-creds: ${{ secrets.FIREBASECREDS }}
- name: Promote Beta to Production Play Store
run: bundle exec fastlane promote_to_production

View File

@ -21,7 +21,7 @@ jobs:
- name: Tag Weekly Release
env:
GITHUB_TOKEN: ${{ secrets.TAG_PUSH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew :reckonTagPush -Preckon.stage=final
- name: Trigger Workflow

View File

@ -16,6 +16,7 @@ plugins {
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.dependencyGuard) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.firebase.appdistribution) apply false
alias(libs.plugins.firebase.perf) apply false
alias(libs.plugins.gms) apply false
alias(libs.plugins.ksp) apply false

View File

@ -34,11 +34,6 @@ kotlin {
implementation(libs.kotlinx.serialization.json)
}
commonTest.dependencies {
implementation(libs.multiplatform.settings)
implementation(libs.multiplatform.settings.test)
}
androidMain.dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.tracing.ktx)

View File

@ -1 +0,0 @@
/build

View File

@ -1,3 +0,0 @@
# :core:datastore-proto module
## Dependency graph
![Dependency graph](../../docs/images/graphs/dep_graph_core_datastore_proto.svg)

View File

@ -1,43 +0,0 @@
/*
* 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.kmp.library)
alias(libs.plugins.protobuf)
id("kotlinx-serialization")
}
android {
namespace = "org.mifos.mobilewallet.mifospay.core.datastore.proto"
}
// Setup protobuf configuration, generating lite Java and Kotlin classes
protobuf {
protoc {
artifact = libs.protobuf.protoc.get().toString()
}
generateProtoTasks {
all().forEach { task ->
task.builtins {
register("kotlin") {
option("lite")
}
}
}
}
}
kotlin {
sourceSets {
commonMain.dependencies {
api(libs.protobuf.kotlin.lite)
implementation(libs.kotlinx.serialization.core)
}
}
}

View File

@ -1,13 +0,0 @@
syntax = "proto3";
option java_package = "org.mifospay.core.datastore.proto";
option java_multiple_files = true;
message Client {
string name = 1;
string image = 2;
string external_id = 3;
int64 client_id = 4;
string display_name = 5;
string mobile_no = 6;
}

View File

@ -1,11 +0,0 @@
syntax = "proto3";
option java_package = "org.mifospay.core.datastore.proto";
option java_multiple_files = true;
message Role {
string id = 1;
string name = 2;
string description = 3;
bool disabled = 4;
}

View File

@ -1,20 +0,0 @@
syntax = "proto3";
import "proto/org/mifospay/core/datastore/proto/role_info.proto";
option java_package = "org.mifospay.core.datastore.proto";
option java_multiple_files = true;
message User {
string username = 1;
int64 userId = 2;
string base64EncodedAuthenticationKey = 3;
bool authenticated = 4;
int32 officeId = 5;
string officeName = 6;
repeated Role roles = 7;
repeated string permissions = 8;
repeated int64 clients = 9;
bool shouldRenewPassword = 10;
bool isTwoFactorAuthenticationRequired = 11;
}

View File

@ -9,6 +9,7 @@
*/
plugins {
alias(libs.plugins.mifospay.kmp.library)
id("kotlinx-serialization")
}
android {
@ -33,7 +34,6 @@ kotlin {
implementation(libs.kotlinx.serialization.core)
implementation(projects.core.model)
implementation(projects.core.common)
implementation(projects.core.datastoreProto)
}
commonTest.dependencies {

View File

@ -9,9 +9,9 @@
*/
package org.mifospay.core.datastore
import org.mifospay.core.datastore.proto.ClientPreferences
import org.mifospay.core.datastore.proto.RolePreferences
import org.mifospay.core.datastore.proto.UserInfoPreferences
import org.mifospay.core.datastore.model.ClientPreferences
import org.mifospay.core.datastore.model.RolePreferences
import org.mifospay.core.datastore.model.UserInfoPreferences
import org.mifospay.core.model.client.Client
import org.mifospay.core.model.user.RoleInfo
import org.mifospay.core.model.user.UserInfo

View File

@ -22,8 +22,8 @@ import kotlinx.coroutines.flow.map
import kotlinx.coroutines.withContext
import kotlinx.serialization.ExperimentalSerializationApi
import org.mifospay.core.datastore.UserPreferencesDataSource.Companion.DEFAULT_ACCOUNT
import org.mifospay.core.datastore.proto.ClientPreferences
import org.mifospay.core.datastore.proto.UserInfoPreferences
import org.mifospay.core.datastore.model.ClientPreferences
import org.mifospay.core.datastore.model.UserInfoPreferences
import org.mifospay.core.model.account.DefaultAccount
import org.mifospay.core.model.client.Client
import org.mifospay.core.model.client.UpdatedClient

View File

@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
package org.mifospay.core.datastore.proto
package org.mifospay.core.datastore.model
import kotlinx.serialization.Serializable

View File

@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
package org.mifospay.core.datastore.proto
package org.mifospay.core.datastore.model
import kotlinx.serialization.Serializable

View File

@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
package org.mifospay.core.datastore.proto
package org.mifospay.core.datastore.model
import kotlinx.serialization.Serializable

View File

@ -68,6 +68,7 @@ fineractSdk = "1.0.3"
firebaseBom = "33.6.0"
firebaseCrashlyticsPlugin = "3.0.2"
firebasePerfPlugin = "1.4.2"
firebaseAppdistributionGradle = "5.0.0"
# Kotlin KMP Dependencies
kotlin = "2.0.21"
@ -109,6 +110,11 @@ composeNavigation = "2.8.0-alpha10"
jbCoreBundle = "1.0.1"
jbSavedState = "1.2.2"
# Desktop Version
packageName = "MifosWallet"
packageNamespace = "org.mifospay.desktop"
packageVersion = "1.0.0"
[libraries]
accompanist-pager = { group = "com.google.accompanist", name = "accompanist-pager", version.ref = "accompanist" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanist" }
@ -348,6 +354,7 @@ mifos-spotless-plugin = { id = "mifos.spotless.plugin", version = "unspecified"
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsPlugin" }
firebase-perf = { id = "com.google.firebase.firebase-perf", version.ref = "firebasePerfPlugin" }
firebase-appdistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebaseAppdistributionGradle" }
protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" }
roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" }

View File

@ -7,6 +7,7 @@
*
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
import com.google.gms.googleservices.GoogleServicesPlugin.GoogleServicesPluginConfig
import org.mifospay.MifosBuildType
import org.mifospay.dynamicVersion
@ -27,13 +28,15 @@ plugins {
alias(libs.plugins.roborazzi)
id("com.google.android.gms.oss-licenses-plugin")
id("com.google.devtools.ksp")
id("com.google.gms.google-services")
alias(libs.plugins.firebase.appdistribution)
}
android {
namespace = "org.mifospay"
namespace = "org.mifospay.android"
defaultConfig {
applicationId = "org.mifospay"
applicationId = "org.mifospay.android"
versionName = project.dynamicVersion
versionCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1
vectorDrawables.useSupportLibrary = true
@ -139,4 +142,15 @@ dependencyGuard {
modules = true
tree = true
}
}
firebaseAppDistribution {
serviceCredentialsFile = "mifospay-android/firebaseAppDistributionServiceCredentialsFile.json"
releaseNotesFile = "./mifospay-android/build/outputs/changelogBeta"
groups = "continuous-deployment"
}
// Disable to fix memory leak and be compatible with the configuration cache.
configure<GoogleServicesPluginConfig> {
disableVersionCheck = true
}

View File

@ -957,16 +957,7 @@
| | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.20 -> 2.0.21 (*)
| | | | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3 (*)
| | | | \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:2.0.21 (*)
| | | +--- project :core:common (*)
| | | \--- project :core:datastore-proto
| | | +--- com.google.protobuf:protobuf-kotlin-lite:4.26.0
| | | | +--- com.google.protobuf:protobuf-javalite:4.26.0
| | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 2.0.21 (*)
| | | +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
| | | +--- io.insert-koin:koin-bom:4.0.0 (*)
| | | +--- io.insert-koin:koin-core:4.0.0 (*)
| | | +--- io.insert-koin:koin-annotations:1.4.0-RC4 (*)
| | | \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3 (*)
| | | \--- project :core:common (*)
| | +--- project :core:model (*)
| | +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
| | +--- io.insert-koin:koin-bom:4.0.0 (*)
@ -1679,7 +1670,9 @@
| | +--- io.insert-koin:koin-androidx-compose:4.0.0 (*)
| | +--- io.insert-koin:koin-androidx-navigation:4.0.0 (*)
| | +--- io.insert-koin:koin-core-viewmodel:4.0.0 (*)
| | +--- com.google.protobuf:protobuf-kotlin-lite:4.26.0 (*)
| | +--- com.google.protobuf:protobuf-kotlin-lite:4.26.0
| | | +--- com.google.protobuf:protobuf-javalite:4.26.0
| | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 2.0.21 (*)
| | +--- io.insert-koin:koin-core:4.0.0 (*)
| | +--- io.insert-koin:koin-annotations:1.4.0-RC4 (*)
| | +--- project :core:ui (*)

View File

@ -2,7 +2,6 @@
:core:common
:core:data
:core:datastore
:core:datastore-proto
:core:designsystem
:core:domain
:core:model

View File

@ -1,123 +1,83 @@
{
"project_info": {
"project_number": "728434912738",
"project_id": "mifos-mobile-apps",
"storage_bucket": "mifos-mobile-apps.appspot.com"
"project_number": "581746068392",
"project_id": "mifos-wallet",
"storage_bucket": "mifos-wallet.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:728434912738:android:49282a75468730891a1dbb",
"mobilesdk_app_id": "1:581746068392:android:923dc7e0ae51eab358ab9d",
"android_client_info": {
"package_name": "org.mifospay"
"package_name": "org.mifospay.android"
}
},
"oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
],
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCUz3P8uUExMFcPHa1Ga3DBKhjK5zxNn70"
"current_key": "AIzaSyD-ak7NSId25dSXr4cvgj7YVKh0f_4LhG0"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
]
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:728434912738:android:ef7156e455c6a1a41a1dbb",
"mobilesdk_app_id": "1:581746068392:android:923dc7e0ae51eab358ab9d",
"android_client_info": {
"package_name": "org.mifospay.demo.debug"
"package_name": "org.mifospay.android.demo.debug"
}
},
"oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
],
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCUz3P8uUExMFcPHa1Ga3DBKhjK5zxNn70"
"current_key": "AIzaSyD-ak7NSId25dSXr4cvgj7YVKh0f_4LhG0"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
]
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:728434912738:android:0490c291986f0a691a1dbb",
"mobilesdk_app_id": "1:581746068392:android:923dc7e0ae51eab358ab9d",
"android_client_info": {
"package_name": "org.mifospay.debug"
"package_name": "org.mifospay.android.debug"
}
},
"oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
],
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCUz3P8uUExMFcPHa1Ga3DBKhjK5zxNn70"
"current_key": "AIzaSyD-ak7NSId25dSXr4cvgj7YVKh0f_4LhG0"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
]
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:728434912738:android:48ccd9153349f31e1a1dbb",
"mobilesdk_app_id": "1:581746068392:android:923dc7e0ae51eab358ab9d",
"android_client_info": {
"package_name": "org.mifospay.demo"
"package_name": "org.mifospay.android.demo"
}
},
"oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
],
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyCUz3P8uUExMFcPHa1Ga3DBKhjK5zxNn70"
"current_key": "AIzaSyD-ak7NSId25dSXr4cvgj7YVKh0f_4LhG0"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
"client_type": 3
}
]
"other_platform_oauth_client": []
}
}
}

View File

@ -1,4 +1,4 @@
package: name='org.mifospay' versionCode='1' versionName='0.0.4-beta.0.57' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
package: name='org.mifospay.android' versionCode='1' versionName='0.0.4-beta.0.62' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
sdkVersion:'26'
targetSdkVersion:'34'
uses-permission: name='android.permission.INTERNET'
@ -13,7 +13,7 @@ uses-permission: name='android.permission.WAKE_LOCK'
uses-permission: name='com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE'
uses-permission: name='android.permission.ACCESS_ADSERVICES_ATTRIBUTION'
uses-permission: name='android.permission.ACCESS_ADSERVICES_AD_ID'
uses-permission: name='org.mifospay.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION'
uses-permission: name='org.mifospay.android.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION'
application-label:'Mifos Pay'
application-label-af:'Mifos Pay'
application-label-am:'Mifos Pay'
@ -106,7 +106,7 @@ application-icon-320:'res/mipmap/ic_launcher.png'
application-icon-480:'res/mipmap/ic_launcher.png'
application-icon-640:'res/mipmap/ic_launcher.png'
application: label='Mifos Pay' icon='res/mipmap/ic_launcher.png'
launchable-activity: name='org.mifospay.MainActivity' label='' icon=''
launchable-activity: name='org.mifospay.android.MainActivity' label='' icon=''
property: name='android.adservices.AD_SERVICES_CONFIG' resource='res/xml/ga_ad_services_config.xml'
uses-library-not-required:'androidx.window.extensions'
uses-library-not-required:'androidx.window.sidecar'

View File

@ -1,32 +0,0 @@
/*
* 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
*/
package org.mifospay
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
/**
* Instrumentation test, which will execute on an Android device.
*
* @see [Testing documentation](http://d.android.com/tools/testing)
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
@Throws(Exception::class)
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().context
Assert.assertEquals("org.mifospay", appContext.packageName)
}
}

View File

@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
package org.mifospay
package org.mifospay.android
import android.os.Bundle
import androidx.activity.ComponentActivity

View File

@ -7,7 +7,7 @@
*
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
package org.mifospay
package org.mifospay.android
import android.app.Application
import org.koin.android.ext.koin.androidContext

View File

@ -42,39 +42,17 @@ kotlin {
}
}
fun String.formatToValidVersion(): String {
// Remove any text after '-' or '+'
val cleanVersion = this.split(Regex("[-+]")).first()
// Split version numbers
val parts = cleanVersion.split(".")
return when {
// If starts with 0, change to 1
parts[0] == "0" -> {
val newParts = parts.toMutableList()
newParts[0] = "1"
// Take only up to 3 parts (MAJOR.MINOR.PATCH)
newParts.take(3).joinToString(".")
}
// If valid, take only up to 3 parts
else -> parts.take(3).joinToString(".")
}
}
val Project.dynamicVersion
get() = project.version.toString().formatToValidVersion()
val productName = "MifosWallet"
val productNameSpace = "org.mifos.pay"
val packageName: String = libs.versions.packageName.get()
val packageNameSpace: String = libs.versions.packageNamespace.get()
val packageVersion: String = libs.versions.packageVersion.get()
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Exe, TargetFormat.Deb)
packageName = productName
packageVersion = project.dynamicVersion
packageName = this@Build_gradle.packageName
packageVersion = this@Build_gradle.packageVersion
description = "Mifos Wallet Desktop Application"
copyright = "© 2024 Mifos Initiative. All rights reserved."
vendor = "Mifos Initiative"
@ -82,8 +60,8 @@ compose.desktop {
includeAllModules = true
macOS {
bundleID = productNameSpace
dockName = productName
bundleID = packageNameSpace
dockName = this@Build_gradle.packageName
iconFile.set(project.file("icons/ic_launcher.icns"))
notarization {
val providers = project.providers
@ -94,7 +72,7 @@ compose.desktop {
}
windows {
menuGroup = productName
menuGroup = this@Build_gradle.packageName
shortcut = true
dirChooser = true
perUserInstall = true

View File

@ -1,5 +1,4 @@
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
plugins {
alias(libs.plugins.kotlinMultiplatform)
@ -21,19 +20,9 @@ kotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
moduleName = "mifospay-wasm"
val projectPath: String = project.rootDir.path
browser {
commonWebpackConfig {
outputFileName = "mifospay-wasm.js"
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
static = (static ?: mutableListOf()).apply {
add(projectPath)
add("$projectPath/mifospay-shared/")
add("$projectPath/mifospay-web/")
add("$projectPath/core/designsystem")
add("$projectPath/core/ui")
}
}
}
}
binaries.executable()
@ -46,11 +35,20 @@ kotlin {
dependsOn(commonMain.get())
dependencies {
implementation(projects.mifospayShared)
implementation(projects.core.common)
implementation(projects.core.data)
implementation(projects.core.model)
implementation(projects.core.datastore)
implementation(compose.runtime)
implementation(compose.ui)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.components.resources)
implementation(libs.multiplatform.settings)
implementation(libs.multiplatform.settings.serialization)
implementation(libs.multiplatform.settings.coroutines)
}
}

View File

@ -2,6 +2,7 @@
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.window.ComposeViewport
import kotlinx.browser.document
import org.jetbrains.skiko.wasm.onWasmReady
import org.mifospay.shared.MifosPaySharedApp
import org.mifospay.shared.di.initKoin
@ -9,7 +10,9 @@ import org.mifospay.shared.di.initKoin
fun main() {
initKoin()
ComposeViewport(document.body!!) {
MifosPaySharedApp()
onWasmReady {
ComposeViewport(document.body!!) {
MifosPaySharedApp()
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

View File

@ -3,8 +3,36 @@
<head>
<meta charset="UTF-8">
<title>Mifos Wallet</title>
<script src="skiko.js"></script>
<link rel="shortcut icon" href="./favicon.ico">
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<link href="styles.css" rel="stylesheet" type="text/css"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name='description' content='A Kotlin Multiplatform application based on top of Fineract.'>
<meta name='keywords' content='mifos, mobile, mobile-pay, wallet, mifos wallet'>
<meta name='subject' content='Mifos Wallet'>
<meta name='copyright' content='Mifos Initiative'>
<meta name='language' content='EN'>
<meta name="author" content="Mifos Initiative">
<meta name='robots' content='noindex,nofollow'>
<meta name='apple-touch-fullscreen' content='yes'>
<meta name="apple-mobile-web-app-title" content="Mifos Wallet">
<meta property='og:url' content='https://openmf.github.io/mobile-wallet/'>
<meta property='og:image' content='https://user-images.githubusercontent.com/44283521/78983673-455cf780-7b42-11ea-849e-ecd2009dd562.png'>
<meta property='og:site_name' content='Mifos Wallet'>
<meta property='og:description' content='A Kotlin Multiplatform application based on top of Fineract.'>
<meta name="twitter:title" content="Mifos Wallet">
<meta name="twitter:description" content="A Kotlin Multiplatform application based on top of Fineract.">
<meta property="og:image" content="https://user-images.githubusercontent.com/44283521/78983673-455cf780-7b42-11ea-849e-ecd2009dd562.png">
<meta property="og:image:width" content="321">
<meta property="og:image:height" content="321">
<meta name="twitter:image" content="https://user-images.githubusercontent.com/44283521/78983673-455cf780-7b42-11ea-849e-ecd2009dd562.png">
<script src="skiko.js"></script>
</head>
<body>
<div id="ComposeTargetContainer">

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

View File

@ -49,7 +49,6 @@ include(":core:common")
include(":core:network")
include(":core:network")
include(":core:model")
include(":core:datastore-proto")
include(":core:analytics")
include(":feature:home")