Skip to content

Commit 4e1ce2c

Browse files
committed
fix: fix conflicts with develop
2 parents 316ebc4 + 3db6518 commit 4e1ce2c

File tree

119 files changed

+7361
-3378
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+7361
-3378
lines changed

app/proguard-rules.pro

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
# removes such information by default, so configure it to keep all of it.
44
-keepattributes Signature
55

6+
# CRITICAL: Keep generic type information for TypeToken to work properly
7+
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
8+
-keepattributes *Annotation*
9+
610
# For using GSON @Expose annotation
711
-keepattributes *Annotation*
812

@@ -23,8 +27,74 @@
2327
}
2428

2529
# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
26-
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
27-
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
30+
# CRITICAL: Do NOT allow obfuscation or shrinking of TypeToken - it needs to preserve generic type information
31+
-keep class com.google.gson.reflect.TypeToken
32+
-keep class * extends com.google.gson.reflect.TypeToken
33+
34+
# Keep TypeToken constructors and methods to preserve generic type information
35+
-keepclassmembers class com.google.gson.reflect.TypeToken {
36+
<init>(...);
37+
<methods>;
38+
}
39+
40+
# Keep all Gson reflection classes that handle generic types
41+
-keep class com.google.gson.reflect.** { *; }
42+
43+
# CRITICAL: Keep Google Guava TypeToken and TypeCapture classes (used by Gson)
44+
-keep class com.google.common.reflect.TypeToken { *; }
45+
-keep class com.google.common.reflect.TypeCapture { *; }
46+
-keep class com.google.common.reflect.TypeToken$* { *; }
47+
-keep class com.google.common.reflect.TypeCapture$* { *; }
48+
49+
# Keep all anonymous subclasses of TypeToken (created by object : TypeToken<T>() {})
50+
-keep class * extends com.google.common.reflect.TypeToken { *; }
51+
-keep class * extends com.google.gson.reflect.TypeToken { *; }
52+
53+
# Keep Gson TypeAdapter classes used by Room TypeConverters
54+
-keep class * extends com.google.gson.TypeAdapter
55+
-keep class * implements com.google.gson.TypeAdapterFactory
56+
57+
# Keep Room TypeConverters that use Gson (important for complex types like List<SectionScoreDb>)
58+
-keep @androidx.room.TypeConverter class * { *; }
59+
-keepclassmembers class * {
60+
@androidx.room.TypeConverter <methods>;
61+
}
62+
63+
# Keep generic type information for Room entities with complex types
64+
-keepclassmembers class org.openedx.**.data.model.room.** {
65+
<fields>;
66+
<init>(...);
67+
* mapToDomain();
68+
* mapToRoomEntity();
69+
* mapToEntity();
70+
}
71+
72+
# CRITICAL: Keep the CourseConverter and all its TypeToken usage
73+
-keep class org.openedx.course.data.storage.CourseConverter { *; }
74+
-keepclassmembers class org.openedx.course.data.storage.CourseConverter {
75+
<init>(...);
76+
<methods>;
77+
}
78+
79+
# Keep anonymous TypeToken subclasses created in CourseConverter
80+
-keep class org.openedx.course.data.storage.CourseConverter$* { *; }
81+
82+
# CRITICAL: Prevent obfuscation of CourseConverter methods that use TypeToken
83+
-keepclassmembers,allowobfuscation class org.openedx.course.data.storage.CourseConverter {
84+
@androidx.room.TypeConverter <methods>;
85+
}
86+
87+
# Keep all TypeConverter classes that use Gson
88+
-keep class org.openedx.discovery.data.converter.DiscoveryConverter { *; }
89+
90+
# Keep the specific TypeToken usage patterns in TypeConverters
91+
-keepclassmembers class org.openedx.**.data.storage.** {
92+
@androidx.room.TypeConverter <methods>;
93+
}
94+
95+
-keepclassmembers class org.openedx.**.data.converter.** {
96+
@androidx.room.TypeConverter <methods>;
97+
}
2898
##---------------End: proguard configuration for Gson ----------
2999

30100
-keepclassmembers class * extends java.lang.Enum {
@@ -33,6 +103,45 @@
33103
public static ** valueOf(java.lang.String);
34104
}
35105

106+
##---------------Begin: proguard configuration for Kotlin Coroutines ----------
107+
# Keep all coroutine-related classes and methods
108+
-keep class kotlinx.coroutines.** { *; }
109+
-keep class kotlin.coroutines.** { *; }
110+
-keep class kotlin.coroutines.intrinsics.** { *; }
111+
112+
# Keep suspend functions and coroutine builders
113+
-keepclassmembers class * {
114+
kotlin.coroutines.Continuation *(...);
115+
}
116+
117+
# Keep coroutine context and related classes
118+
-keep class kotlinx.coroutines.CoroutineContext$* { *; }
119+
120+
# Keep Flow and StateFlow classes
121+
-keep class kotlinx.coroutines.flow.** { *; }
122+
123+
# Keep coroutine dispatchers
124+
-keep class kotlinx.coroutines.Dispatchers { *; }
125+
-keep class kotlinx.coroutines.Dispatchers$* { *; }
126+
127+
# Keep coroutine scope and job classes
128+
-keep class kotlinx.coroutines.CoroutineScope { *; }
129+
-keep class kotlinx.coroutines.Job { *; }
130+
-keep class kotlinx.coroutines.Job$* { *; }
131+
132+
# Keep coroutine intrinsics that are causing the error
133+
-keep class kotlin.coroutines.intrinsics.IntrinsicsKt { *; }
134+
-keep class kotlin.coroutines.intrinsics.IntrinsicsKt$* { *; }
135+
136+
# Keep suspend function markers
137+
-keepclassmembers class * {
138+
@kotlin.coroutines.RestrictsSuspension <methods>;
139+
}
140+
141+
# Keep coroutine-related annotations
142+
-keep @kotlin.coroutines.RestrictsSuspension class * { *; }
143+
##---------------End: proguard configuration for Kotlin Coroutines ----------
144+
36145
-dontwarn org.bouncycastle.jsse.BCSSLParameters
37146
-dontwarn org.bouncycastle.jsse.BCSSLSocket
38147
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider

app/schemas/org.openedx.app.room.AppDatabase/4.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"formatVersion": 1,
33
"database": {
44
"version": 4,
5-
"identityHash": "488bd2b78e977fef626afb28014c80f2",
5+
"identityHash": "7ea446decde04c9c16700cb3981703c2",
66
"entities": [
77
{
88
"tableName": "course_discovery_table",
@@ -937,7 +937,7 @@
937937
},
938938
{
939939
"tableName": "video_progress_table",
940-
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`block_id` TEXT NOT NULL, `video_url` TEXT NOT NULL, `video_time` INTEGER NOT NULL, `duration` INTEGER NOT NULL, PRIMARY KEY(`block_id`))",
940+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`block_id` TEXT NOT NULL, `video_url` TEXT NOT NULL, `video_time` INTEGER, `duration` INTEGER, PRIMARY KEY(`block_id`))",
941941
"fields": [
942942
{
943943
"fieldPath": "blockId",
@@ -955,13 +955,13 @@
955955
"fieldPath": "videoTime",
956956
"columnName": "video_time",
957957
"affinity": "INTEGER",
958-
"notNull": true
958+
"notNull": false
959959
},
960960
{
961961
"fieldPath": "duration",
962962
"columnName": "duration",
963963
"affinity": "INTEGER",
964-
"notNull": true
964+
"notNull": false
965965
}
966966
],
967967
"primaryKey": {
@@ -1138,7 +1138,7 @@
11381138
],
11391139
"setupQueries": [
11401140
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
1141-
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '488bd2b78e977fef626afb28014c80f2')"
1141+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7ea446decde04c9c16700cb3981703c2')"
11421142
]
11431143
}
11441144
}

0 commit comments

Comments
 (0)