diff --git a/.gitignore b/.gitignore
index 6fff2311b48..eb51c38bc36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,5 @@ mifosng-android/src/main/assets/crashlytics-build.properties
android-client.iml
mifosng-android/mifosng-android.iml
*.hprof
-android-client.iml
\ No newline at end of file
+android-client.iml
+/secrets.properties
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index eb92788ef20..453bacdcced 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -6,4 +6,5 @@ plugins {
alias(libs.plugins.hilt) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.androidx.navigation) apply false
+ alias(libs.plugins.secrets) apply false
}
diff --git a/core/common/build.gradle.kts b/core/common/build.gradle.kts
index 7436611bdf8..6d5238af46e 100644
--- a/core/common/build.gradle.kts
+++ b/core/common/build.gradle.kts
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
+ alias(libs.plugins.secrets)
}
android {
@@ -32,6 +33,14 @@ android {
kotlinOptions {
jvmTarget = "17"
}
+
+ buildFeatures {
+ buildConfig = true
+ }
+}
+
+secrets {
+ defaultPropertiesFileName = "secrets.defaults.properties"
}
dependencies {
diff --git a/core/common/src/main/java/com/mifos/core/common/utils/BaseUrl.kt b/core/common/src/main/java/com/mifos/core/common/utils/BaseUrl.kt
index bac4102c7c7..9e10e84fb1f 100644
--- a/core/common/src/main/java/com/mifos/core/common/utils/BaseUrl.kt
+++ b/core/common/src/main/java/com/mifos/core/common/utils/BaseUrl.kt
@@ -1,16 +1,20 @@
package com.mifos.core.common.utils
+import com.mifos.core.common.BuildConfig
+
object BaseUrl {
+ private val configs = BuildConfig.DEMO_SERVER_CONFIG.split(",")
+
// "/" in the last of the base url always
- const val PROTOCOL_HTTPS = "https://"
+ val PROTOCOL_HTTPS = configs[0]
- const val API_ENDPOINT = "demo.mifos.community"
+ val API_ENDPOINT = configs[1]
- const val API_PATH = "/fineract-provider/api/v1/"
+ val API_PATH = configs[2]
- const val PORT = "80"
+ val PORT = configs[3]
- const val TENANT = "default"
+ val TENANT = configs[4]
}
\ No newline at end of file
diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts
index a16966cf2c7..2e4c0a43e5c 100644
--- a/core/network/build.gradle.kts
+++ b/core/network/build.gradle.kts
@@ -3,6 +3,7 @@ plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.hilt)
alias(libs.plugins.kotlin.serialization)
+ alias(libs.plugins.secrets)
id(libs.plugins.kotlin.parcelize.get().pluginId)
id(libs.plugins.kotlin.kapt.get().pluginId)
}
@@ -27,13 +28,23 @@ android {
)
}
}
+
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
+
kotlinOptions {
jvmTarget = "17"
}
+
+ buildFeatures {
+ buildConfig = true
+ }
+}
+
+secrets {
+ defaultPropertiesFileName = "secrets.defaults.properties"
}
dependencies {
diff --git a/core/network/src/main/java/com/mifos/core/network/BaseUrl.kt b/core/network/src/main/java/com/mifos/core/network/BaseUrl.kt
index 9b3289fadc6..300164462dd 100644
--- a/core/network/src/main/java/com/mifos/core/network/BaseUrl.kt
+++ b/core/network/src/main/java/com/mifos/core/network/BaseUrl.kt
@@ -8,11 +8,14 @@ package com.mifos.core.network
* @author fomenkoo
*/
class BaseUrl {
+
// "/" in the last of the base url always
companion object {
- const val PROTOCOL_HTTPS = "https://"
- const val API_ENDPOINT = "demo.mifos.community"
- const val API_PATH = "/fineract-provider/api/v1/"
- const val PORT = "80"
+ private val configs = BuildConfig.DEMO_SERVER_CONFIG.split(",")
+
+ val PROTOCOL_HTTPS = configs[0]
+ val API_ENDPOINT = configs[1]
+ val API_PATH = configs[2]
+ val PORT = configs[3]
}
}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 70564ff8b9a..3a2fbdd27c6 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -16,7 +16,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
-org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
diff --git a/mifosng-android/build.gradle.kts b/mifosng-android/build.gradle.kts
index a7118264508..4751e361fc8 100644
--- a/mifosng-android/build.gradle.kts
+++ b/mifosng-android/build.gradle.kts
@@ -11,6 +11,7 @@ plugins {
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.hilt)
+ alias(libs.plugins.secrets)
id(libs.plugins.kotlin.parcelize.get().pluginId)
id(libs.plugins.kotlin.kapt.get().pluginId)
}
@@ -118,6 +119,10 @@ android {
}
}
+secrets {
+ defaultPropertiesFileName = "secrets.defaults.properties"
+}
+
dependencies {
implementation(project(":feature:auth"))
diff --git a/mifosng-android/src/main/AndroidManifest.xml b/mifosng-android/src/main/AndroidManifest.xml
index 8cb9fd4f183..a14f2c28877 100755
--- a/mifosng-android/src/main/AndroidManifest.xml
+++ b/mifosng-android/src/main/AndroidManifest.xml
@@ -28,7 +28,7 @@
+ android:value="${GEO_API_KEY}" />