Skip to content

Commit

Permalink
Merge kmm-impl to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
niyajali committed Nov 6, 2024
1 parent f260d8d commit 7e0b164
Show file tree
Hide file tree
Showing 280 changed files with 1,664 additions and 25,944 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/master_dev_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Check Dependency Guard
id: dependencyguard_verify
continue-on-error: true
run: ./gradlew dependencyGuard
run: ./gradlew :mifospay-android:dependencyGuard

- name: Prevent updating Dependency Guard baselines if this is a fork
id: checkfork_dependencyguard
Expand All @@ -88,7 +88,7 @@ jobs:
id: dependencyguard_baseline
if: steps.dependencyguard_verify.outcome == 'failure' && github.event_name == 'pull_request'
run: |
./gradlew dependencyGuardBaseline
./gradlew :mifospay-android:dependencyGuardBaseline
- name: Push new Dependency Guard baselines if available
uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -109,7 +109,8 @@ jobs:
java-version: 17
- name: Run tests
run: |
./gradlew testDemoDebug :lint:test :mifospay:lintProdRelease :lint:lint
./gradlew :mifospay-android:testDemoDebug
# ./gradlew testDemoDebug :lint:test :mifospay-android:lintProdRelease :lint:lint
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -130,12 +131,12 @@ jobs:
java-version: 17

- name: Build APKs
run: ./gradlew :mifospay:assembleDemoDebug
run: ./gradlew :mifospay-android:assembleDemoDebug

- name: Check badging
# This step is allowed to fail, as it's not critical for the build
continue-on-error: true
run: ./gradlew :mifospay:checkProdReleaseBadging
run: ./gradlew :mifospay-android:checkProdReleaseBadging

- name: Upload APKs
uses: actions/upload-artifact@v4
Expand Down
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,36 @@ that can be used as a dependency in any other wallet based project. It is develo

Mifos boasts an active and vibrant contributor community, Please join us on [slack](https://join.slack.com/t/mifos/shared_invite/zt-2f4nr6tk3-ZJlHMi1lc0R19FFEHxdvng). Once you've joined the mifos slack community, please join the `#mobile-wallet` channel to engage with mobile-wallet development. If you encounter any difficulties joining our Slack channel, please don't hesitate to open an issue. This will allow us to assist you promptly or send you an invitation.

### [How to Contribute](https://github.com/openMF/mobile-wallet/wiki/How-to-Contribute)
### [Branch Policy](https://github.com/openMF/mobile-wallet/wiki/Branch-Policy)

## How to Contribute

Thank you for your interest in contributing to the Mobile Wallet project by Mifos! We welcome all contributions and encourage you to follow these guidelines to ensure a smooth and efficient collaboration process.

The issues should be raised via the GitHub issue tracker. For Issue tracker guidelines please click <a href="https://github.com/openMF/mobile-wallet/blob/master/.github/CONTRIBUTING.md#issue-tracker">here</a>. All fixes should be proposed via pull requests. For pull request guidelines please click <a href="https://github.com/openMF/mobile-wallet/blob/master/.github/CONTRIBUTING.md#pull-requests">here</a>. For commit style guidelines please click <a href="https://github.com/openMF/mobile-wallet/wiki/Commit-style-guide">here</a>.

### Branch Policy

We have the following branches :

* **dev**
All the contributions should be pushed to this branch. If you're making a contribution,
you are supposed to make a pull request to _dev_.
Please make sure it passes a build check on Travis.

It is advisable to clone only the development branch using the following command:

```
git clone -b <branch> <remote_repo>
```
With Git 1.7.10 and later, add --single-branch to prevent fetching of all branches. Example, with development branch:
```
git clone -b dev --single-branch https://github.com/username/mobile-wallet.git`
```
* **master**
The master branch contains all the stable and bug-free working code. The development branch once complete will be merged with this branch.
### Demo credentials
Fineract Instance: demo.mifos.io
Expand Down
56 changes: 18 additions & 38 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ dependencies {
compileOnly(libs.android.gradlePlugin)
compileOnly(libs.android.tools.common)
compileOnly(libs.compose.gradlePlugin)
compileOnly(libs.firebase.crashlytics.gradlePlugin)
compileOnly(libs.firebase.performance.gradlePlugin)
compileOnly(libs.kotlin.gradlePlugin)
compileOnly(libs.ksp.gradlePlugin)
compileOnly(libs.room.gradlePlugin)
compileOnly(libs.detekt.gradlePlugin)
compileOnly(libs.ktlint.gradlePlugin)
compileOnly(libs.spotless.gradle)
Expand All @@ -43,6 +40,7 @@ tasks {

gradlePlugin {
plugins {
// Android Plugins
register("androidApplicationCompose") {
id = "mifospay.android.application.compose"
implementationClass = "AndroidApplicationComposeConventionPlugin"
Expand All @@ -51,46 +49,28 @@ gradlePlugin {
id = "mifospay.android.application"
implementationClass = "AndroidApplicationConventionPlugin"
}
register("androidLibraryCompose") {
id = "mifospay.android.library.compose"
implementationClass = "AndroidLibraryComposeConventionPlugin"
}
register("androidLibrary") {
id = "mifospay.android.library"
implementationClass = "AndroidLibraryConventionPlugin"
}
register("androidFeature") {
id = "mifospay.android.feature"
implementationClass = "AndroidFeatureConventionPlugin"
}
register("androidTest") {
id = "mifospay.android.test"
implementationClass = "AndroidTestConventionPlugin"
}
register("androidRoom") {
id = "mifospay.android.room"
implementationClass = "AndroidRoomConventionPlugin"
}
register("androidFirebase") {
id = "mifospay.android.application.firebase"
implementationClass = "AndroidApplicationFirebaseConventionPlugin"
}
register("androidLint") {
id = "mifospay.android.lint"
implementationClass = "AndroidLintConventionPlugin"
}
register("jvmLibrary") {
id = "mifospay.jvm.library"
implementationClass = "JvmLibraryConventionPlugin"
}

register("androidFlavors") {
id = "mifospay.android.application.flavors"
implementationClass = "AndroidApplicationFlavorsConventionPlugin"
}
register("androidKoin") {
id = "mifospay.android.koin"
implementationClass = "AndroidKoinConventionPlugin"

// KMP & CMP Plugins
register("cmpFeature") {
id = "mifospay.cmp.feature"
implementationClass = "CMPFeatureConventionPlugin"
}

register("kmpKoin") {
id = "mifospay.kmp.koin"
implementationClass = "KMPKoinConventionPlugin"
}
register("kmpLibrary") {
id = "mifospay.kmp.library"
implementationClass = "KMPLibraryConventionPlugin"
}

// Static Analysis & Formatting Plugins
register("detekt") {
id = "mifos.detekt.plugin"
implementationClass = "MifosDetektConventionPlugin"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,48 +1,44 @@
import com.android.build.api.variant.LibraryAndroidComponentsExtension

import com.android.build.gradle.LibraryExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.kotlin
import org.mifospay.configureFlavors
import org.mifospay.configureKotlinAndroid
import org.mifospay.configurePrintApksTask
import org.mifospay.disableUnnecessaryAndroidTests
import org.mifospay.configureKotlinMultiplatform
import org.mifospay.libs

class AndroidLibraryConventionPlugin : Plugin<Project> {
class KMPLibraryConventionPlugin: Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("com.android.library")
apply("org.jetbrains.kotlin.android")
apply("mifospay.android.lint")
apply("org.jetbrains.kotlin.multiplatform")
apply("mifospay.kmp.koin")
apply("mifos.detekt.plugin")
apply("mifos.spotless.plugin")
apply("mifos.ktlint.plugin")
apply("mifospay.android.koin")
}

configureKotlinMultiplatform()

extensions.configure<LibraryExtension> {
configureKotlinAndroid(this)
defaultConfig.targetSdk = 34
testOptions.animationsDisabled = true
configureFlavors(this)
// The resource prefix is derived from the module name,
// so resources inside ":core:module1" must be prefixed with "core_module1_"
resourcePrefix = path.split("""\W""".toRegex()).drop(1).distinct().joinToString(separator = "_").lowercase() + "_"
}

extensions.configure<LibraryAndroidComponentsExtension> {
configurePrintApksTask(this)
disableUnnecessaryAndroidTests(target)
resourcePrefix = path
.split("""\W""".toRegex())
.drop(1).distinct()
.joinToString(separator = "_")
.lowercase() + "_"
}

dependencies {
add("testImplementation", kotlin("test"))
add("implementation", libs.findLibrary("androidx.tracing.ktx").get())
add("commonTestImplementation", libs.findLibrary("kotlin.test").get())
add("commonTestImplementation", libs.findLibrary("kotlinx.coroutines.test").get())
}
}
}
}
}
2 changes: 0 additions & 2 deletions build-logic/convention/src/main/kotlin/org/mifospay/Detekt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.named
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

internal fun Project.configureDetekt(extension: DetektExtension) = extension.apply {
tasks.named<Detekt>("detekt") {
jvmTarget = "17"
reports {
xml.required.set(true)
html.required.set(true)
Expand Down
22 changes: 14 additions & 8 deletions core/analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
*/
plugins {
alias(libs.plugins.mifospay.android.library)
alias(libs.plugins.mifospay.android.library.compose)
alias(libs.plugins.mifospay.kmp.library)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.compose.compiler)
}

android {
namespace = "org.mifospay.core.analytics"
}

dependencies {
implementation(libs.androidx.compose.runtime)

implementation(platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
}
kotlin {
sourceSets {
commonMain.dependencies {
implementation(compose.runtime)
}
androidMain.dependencies {
implementation(project.dependencies.platform(libs.firebase.bom))
implementation(libs.firebase.analytics)
}
}
}
Loading

0 comments on commit 7e0b164

Please sign in to comment.