Skip to content

Commit 343de61

Browse files
committed
MIFOSAC-293 Applied Spotless And Detekt in Core: Common
1 parent 7cbe06d commit 343de61

23 files changed

+290
-135
lines changed

core/common/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
9+
*/
110
plugins {
211
alias(libs.plugins.mifos.android.library)
312
alias(libs.plugins.mifos.android.hilt)

core/common/src/main/AndroidManifest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2024 Mifos Initiative
4+
5+
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
6+
If a copy of the MPL was not distributed with this file,
7+
You can obtain one at https://mozilla.org/MPL/2.0/.
8+
9+
See https://github.com/openMF/android-client/blob/master/LICENSE.md
10+
-->
211
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
312

413
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

core/common/src/main/java/com/mifos/core/common/enums/MifosAppLanguage.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
9+
*/
110
package com.mifos.core.common.enums
211

312
enum class MifosAppLanguage(val code: String, val displayName: String) {
@@ -19,7 +28,8 @@ enum class MifosAppLanguage(val code: String, val displayName: String) {
1928
PORTUGUESE("pt", "Português"),
2029
RUSSIAN("ru", "русский"),
2130
SWAHILI("sw", "Kiswahili"),
22-
FARSI("fa", "فارسی");
31+
FARSI("fa", "فارسی"),
32+
;
2333

2434
companion object {
2535
fun fromCode(code: String): MifosAppLanguage {
@@ -30,4 +40,4 @@ enum class MifosAppLanguage(val code: String, val displayName: String) {
3040
override fun toString(): String {
3141
return displayName
3242
}
33-
}
43+
}

core/common/src/main/java/com/mifos/core/common/model/user/Role.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/*
2-
* This project is licensed under the open source MPL V2.
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
38
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
49
*/
510
package com.mifos.core.common.model.user
@@ -12,5 +17,5 @@ data class Role(
1217

1318
var name: String? = null,
1419

15-
var description: String? = null
16-
)
20+
var description: String? = null,
21+
)

core/common/src/main/java/com/mifos/core/common/model/user/User.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/*
2-
* This project is licensed under the open source MPL V2.
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
38
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
49
*/
510
package com.mifos.core.common.model.user
@@ -20,4 +25,4 @@ class User {
2025
var roles: List<Role> = ArrayList()
2126

2227
var permissions: List<String> = ArrayList()
23-
}
28+
}

core/common/src/main/java/com/mifos/core/common/network/MifosDispatchers.kt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
9+
*/
210
package com.mifos.core.common.network
311

412
import javax.inject.Qualifier

core/common/src/main/java/com/mifos/core/common/network/di/CoroutineScopesModule.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
9+
*/
110
package com.mifos.core.common.network.di
211

312
import com.mifos.core.common.network.Dispatcher

core/common/src/main/java/com/mifos/core/common/network/di/DispatchersModule.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
9+
*/
110
package com.mifos.core.common.network.di
211

312
import com.mifos.core.common.network.Dispatcher

core/common/src/main/java/com/mifos/core/common/utils/AndroidVersionUtil.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
9+
*/
110
package com.mifos.core.common.utils
211

312
import android.os.Build
@@ -14,4 +23,4 @@ object AndroidVersionUtil {
1423
fun isApiVersionGreaterOrEqual(thisVersion: Int): Boolean {
1524
return Build.VERSION.SDK_INT >= thisVersion
1625
}
17-
}
26+
}

core/common/src/main/java/com/mifos/core/common/utils/BaseUrl.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
9+
*/
110
package com.mifos.core.common.utils
211

312
import com.mifos.core.common.BuildConfig
@@ -17,4 +26,4 @@ object BaseUrl {
1726
val PORT = configs.port
1827

1928
val TENANT = configs.tenant
20-
}
29+
}

0 commit comments

Comments
 (0)