mobile-wallet/mifospay-desktop/build.gradle.kts
Sk Niyaj Ali 6980ca7c5a
feat: Final KMM Clean Up (#1814)
* 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

* feat: Final Dev Cleanup

- Fixed CI Workflow
- Enabled Weekly & Monthly Release
- Fixed Release Build Issue

---------

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>
2024-11-18 22:17:00 -05:00

116 lines
3.6 KiB
Plaintext

/*
* 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
*/
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.kotlin.serialization)
}
kotlin {
jvm("desktop") {
withJava()
}
jvmToolchain(17)
sourceSets {
val desktopMain by getting {
dependencies {
implementation(projects.core.common)
implementation(projects.core.data)
implementation(projects.core.model)
implementation(projects.core.datastore)
implementation(projects.mifospayShared)
implementation(libs.kotlinx.coroutines.swing)
implementation(compose.desktop.currentOs)
implementation(libs.jb.kotlin.stdlib)
implementation(libs.kotlin.reflect)
}
}
}
}
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"
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Exe, TargetFormat.Deb)
packageName = productName
packageVersion = project.dynamicVersion
description = "Mifos Wallet Desktop Application"
copyright = "© 2024 Mifos Initiative. All rights reserved."
vendor = "Mifos Initiative"
licenseFile.set(project.file("../LICENSE"))
includeAllModules = true
macOS {
bundleID = productNameSpace
dockName = productName
iconFile.set(project.file("icons/ic_launcher.icns"))
notarization {
val providers = project.providers
appleID.set(providers.environmentVariable("NOTARIZATION_APPLE_ID"))
password.set(providers.environmentVariable("NOTARIZATION_PASSWORD"))
teamID.set(providers.environmentVariable("NOTARIZATION_TEAM_ID"))
}
}
windows {
menuGroup = productName
shortcut = true
dirChooser = true
perUserInstall = true
iconFile.set(project.file("icons/ic_launcher.ico"))
}
linux {
modules("jdk.security.auth")
iconFile.set(project.file("icons/ic_launcher.png"))
}
}
buildTypes.release.proguard {
configurationFiles.from(file("compose-desktop.pro"))
obfuscate.set(true)
optimize.set(true)
}
}
}