Skip to content

Commit 3c340e3

Browse files
Merge pull request #465 from openedx/develop
Release v2.2 (Ulmo.1)
2 parents ad5fba7 + a3b5977 commit 3c340e3

File tree

319 files changed

+19435
-4374
lines changed

Some content is hidden

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

319 files changed

+19435
-4374
lines changed

app/build.gradle

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ if (firebaseEnabled) {
2828
}
2929

3030
android {
31-
compileSdk 34
31+
namespace 'org.openedx.app'
32+
compileSdkVersion compile_sdk_version
3233

3334
defaultConfig {
3435
applicationId appId
35-
minSdk 24
36-
targetSdk 34
36+
minSdk min_sdk_version
37+
targetSdk target_sdk_version
3738
versionCode 1
3839
versionName "1.0.0"
3940

@@ -42,7 +43,6 @@ android {
4243
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4344
}
4445

45-
namespace 'org.openedx.app'
4646

4747
flavorDimensions += "env"
4848
productFlavors {
@@ -88,12 +88,14 @@ android {
8888
}
8989
}
9090
compileOptions {
91-
sourceCompatibility JavaVersion.VERSION_17
92-
targetCompatibility JavaVersion.VERSION_17
91+
sourceCompatibility java_version
92+
targetCompatibility java_version
9393
}
94-
kotlinOptions {
95-
jvmTarget = JavaVersion.VERSION_17
96-
freeCompilerArgs = List.of("-Xstring-concat=inline")
94+
kotlin {
95+
compilerOptions {
96+
jvmTarget = jvm_target_version
97+
freeCompilerArgs = ['-XXLanguage:+PropertyParamAnnotationDefaultTargetMode']
98+
}
9799
}
98100
buildFeatures {
99101
viewBinding true
@@ -125,22 +127,23 @@ dependencies {
125127
implementation project(path: ':profile')
126128
implementation project(path: ':discussion')
127129
implementation project(path: ':whatsnew')
130+
implementation project(path: ':downloads')
128131

129132
ksp "androidx.room:room-compiler:$room_version"
130133

131-
implementation 'androidx.core:core-splashscreen:1.0.1'
134+
implementation "androidx.core:core-splashscreen:$core_splashscreen_version"
132135

133136
api platform("com.google.firebase:firebase-bom:$firebase_version")
134137
api "com.google.firebase:firebase-messaging"
135138

136139
// Braze SDK Integration
137-
implementation "com.braze:android-sdk-ui:30.2.0"
140+
implementation "com.braze:android-sdk-ui:$braze_sdk_version"
138141

139142
// Plugins
140-
implementation("com.github.openedx:openedx-app-firebase-analytics-android:1.0.0")
143+
implementation("com.github.openedx:openedx-app-firebase-analytics-android:$openedx_firebase_analytics_version")
141144

142-
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
143-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
145+
androidTestImplementation "androidx.test.ext:junit:$test_ext_version"
146+
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
144147
testImplementation "junit:junit:$junit_version"
145148
testImplementation "io.mockk:mockk:$mockk_version"
146149
testImplementation "io.mockk:mockk-android:$mockk_version"
@@ -180,3 +183,7 @@ private def setupFirebaseConfigFields(buildType) {
180183

181184
buildType.manifestPlaceholders = [fcmEnabled: firebaseEnabled && cloudMessagingEnabled]
182185
}
186+
187+
ksp {
188+
arg("room.schemaLocation", "$projectDir/schemas")
189+
}

app/proguard-rules.pro

Lines changed: 117 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
@@ -67,3 +176,9 @@
67176
-dontwarn org.bouncycastle.openssl.PEMKeyPair
68177
-dontwarn org.bouncycastle.openssl.PEMParser
69178
-dontwarn org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter
179+
-dontwarn com.android.billingclient.api.BillingClientStateListener
180+
-dontwarn com.android.billingclient.api.PurchasesUpdatedListener
181+
-dontwarn com.google.crypto.tink.subtle.XChaCha20Poly1305
182+
-dontwarn net.jcip.annotations.GuardedBy
183+
-dontwarn net.jcip.annotations.Immutable
184+
-dontwarn net.jcip.annotations.ThreadSafe

0 commit comments

Comments
 (0)