Skip to content

Commit 4bcb03a

Browse files
authored
Merge pull request #123 from rohan-jadhav-dev/feat/contribution-payment-screen
feat: add contribution screen, payment flow, API client and viewmodel
2 parents f985a31 + 55edd33 commit 4bcb03a

14 files changed

Lines changed: 1753 additions & 104 deletions

File tree

apps/android/ChamaApp/app/build.gradle.kts

Lines changed: 44 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@ plugins {
77

88
android {
99
namespace = "com.example.chama"
10-
compileSdk = 35
10+
compileSdk = 36
1111

1212
defaultConfig {
1313
applicationId = "com.example.chama"
1414
minSdk = 26
15-
targetSdk = 35
15+
targetSdk = 36
1616
versionCode = 1
1717
versionName = "1.0"
18-
1918
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2019
vectorDrawables {
2120
useSupportLibrary = true
2221
}
2322
}
23+
kapt {
24+
arguments {
25+
arg("room.schemaLocation", "$projectDir/schemas")
26+
}
27+
}
2428

2529
buildTypes {
2630
release {
@@ -39,58 +43,53 @@ android {
3943

4044
kotlinOptions {
4145
jvmTarget = "11"
42-
freeCompilerArgs = freeCompilerArgs + listOf(
43-
"-opt-in=kotlin.RequiresOptIn",
44-
"-Xskip-prerelease-check"
45-
)
4646
}
4747

4848
buildFeatures {
49+
compose = true
4950
viewBinding = true
5051
}
5152
}
5253

5354
dependencies {
54-
// Core dependencies
55-
implementation("androidx.core:core-ktx:1.12.0")
56-
implementation("androidx.appcompat:appcompat:1.6.1")
57-
58-
// Lifecycle
59-
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
60-
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
61-
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
62-
63-
// Jetpack Compose Dependencies
64-
implementation(platform("androidx.compose:compose-bom:2023.10.01"))
65-
implementation("androidx.compose.ui:ui")
66-
implementation("androidx.compose.ui:ui-graphics")
67-
implementation("androidx.compose.ui:ui-tooling-preview")
68-
implementation("androidx.compose.material3:material3")
69-
implementation("androidx.activity:activity-compose:1.8.0")
70-
implementation("androidx.compose.material:material-icons-extended")
71-
72-
// Material 3
73-
// implementation("androidx.compose.material:material:1.5.4")
74-
75-
// ROOM DATABASE
76-
implementation("androidx.room:room-runtime:2.6.1")
77-
kapt("androidx.room:room-compiler:2.6.1")
78-
implementation("androidx.room:room-ktx:2.6.1")
79-
80-
// Retrofit
81-
implementation("com.squareup.retrofit2:retrofit:2.9.0")
82-
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
83-
84-
85-
// OkHttp
86-
implementation("com.squareup.okhttp3:okhttp:4.12.0")
87-
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")
88-
// Coroutines
89-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
90-
91-
// Testing
55+
56+
implementation(libs.androidx.core.ktx)
57+
implementation(libs.androidx.appcompat)
58+
59+
implementation(libs.androidx.lifecycle.runtime.ktx)
60+
implementation(libs.androidx.lifecycle.viewmodel.ktx)
61+
implementation(libs.androidx.lifecycle.viewmodel.compose)
62+
63+
implementation(platform(libs.androidx.compose.bom))
64+
implementation(libs.androidx.ui)
65+
implementation(libs.androidx.ui.graphics)
66+
implementation(libs.androidx.ui.tooling.preview)
67+
implementation(libs.androidx.material3)
68+
implementation(libs.androidx.material.icons.extended)
69+
implementation(libs.androidx.runtime.livedata)
70+
implementation(libs.androidx.activity.compose)
71+
72+
implementation(libs.androidx.navigation.compose)
73+
implementation(libs.androidx.navigation.fragment.ktx)
74+
implementation(libs.androidx.navigation.ui.ktx)
75+
76+
implementation(libs.androidx.fragment.ktx)
77+
78+
implementation(libs.androidx.room.runtime)
79+
implementation(libs.androidx.room.ktx)
80+
kapt(libs.androidx.room.compiler)
81+
82+
implementation(libs.retrofit)
83+
implementation(libs.retrofit.converter.gson)
84+
implementation(libs.okhttp)
85+
implementation(libs.okhttp.logging.interceptor)
86+
87+
implementation(libs.kotlinx.coroutines.android)
88+
9289
testImplementation(libs.junit)
9390
androidTestImplementation(libs.androidx.junit.v115)
9491
androidTestImplementation(libs.androidx.espresso.core.v351)
9592

93+
debugImplementation(libs.androidx.ui.tooling)
94+
debugImplementation(libs.androidx.ui.test.manifest)
9695
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"formatVersion": 1,
3+
"database": {
4+
"version": 1,
5+
"identityHash": "d0164d487501fc37641a96d77fd86fc4",
6+
"entities": [
7+
{
8+
"tableName": "users",
9+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `email` TEXT NOT NULL)",
10+
"fields": [
11+
{
12+
"fieldPath": "id",
13+
"columnName": "id",
14+
"affinity": "INTEGER",
15+
"notNull": true
16+
},
17+
{
18+
"fieldPath": "name",
19+
"columnName": "name",
20+
"affinity": "TEXT",
21+
"notNull": true
22+
},
23+
{
24+
"fieldPath": "email",
25+
"columnName": "email",
26+
"affinity": "TEXT",
27+
"notNull": true
28+
}
29+
],
30+
"primaryKey": {
31+
"autoGenerate": true,
32+
"columnNames": [
33+
"id"
34+
]
35+
},
36+
"indices": [],
37+
"foreignKeys": []
38+
}
39+
],
40+
"views": [],
41+
"setupQueries": [
42+
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
43+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd0164d487501fc37641a96d77fd86fc4')"
44+
]
45+
}
46+
}

apps/android/ChamaApp/app/src/main/AndroidManifest.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
5+
<uses-permission android:name="android.permission.INTERNET"/>
56

67
<application
78
android:allowBackup="true"
@@ -13,17 +14,27 @@
1314
android:supportsRtl="true"
1415
android:theme="@style/Theme.Chama"
1516
tools:targetApi="31">
17+
18+
<!-- ✅ Compose MainActivity — LAUNCHER (opens first) -->
1619
<activity
17-
android:name=".ui.MainActivity"
20+
android:name=".MainActivity"
1821
android:exported="true"
1922
android:label="@string/app_name"
2023
android:theme="@style/Theme.Chama">
2124
<intent-filter>
2225
<action android:name="android.intent.action.MAIN" />
23-
2426
<category android:name="android.intent.category.LAUNCHER" />
2527
</intent-filter>
2628
</activity>
29+
30+
<!-- Old AppCompat MainActivity — kept but NOT launcher -->
31+
<activity
32+
android:name=".ui.MainActivity"
33+
android:exported="false"
34+
android:label="@string/app_name"
35+
android:theme="@style/Theme.Chama">
36+
</activity>
37+
2738
</application>
2839

2940
</manifest>

0 commit comments

Comments
 (0)