🐛 fix: Fix GitHub workflow build failures
- Fixed compileSdk syntax error in build.gradle.kts (was using incorrect 'compileSdk { version = release(36) }' instead of 'compileSdk = 36')
- Moved splits configuration out of defaultConfig to correct location
- Added comprehensive ProGuard rules to handle OkHttp's optional dependencies (BouncyCastle, Conscrypt, OpenJSSE)
- Added ProGuard rules for Sardine WebDAV, Coroutines, and Gson
- Build now completes successfully both locally and in CI/CD
This commit is contained in:
@@ -8,9 +8,7 @@ import java.io.FileInputStream
|
||||
|
||||
android {
|
||||
namespace = "dev.dettmer.simplenotes"
|
||||
compileSdk {
|
||||
version = release(36)
|
||||
}
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "dev.dettmer.simplenotes"
|
||||
@@ -20,15 +18,15 @@ android {
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
// Enable multiple APKs per ABI for smaller downloads
|
||||
splits {
|
||||
abi {
|
||||
isEnable = true
|
||||
reset()
|
||||
include("armeabi-v7a", "arm64-v8a")
|
||||
isUniversalApk = true // Also generate universal APK
|
||||
}
|
||||
// Enable multiple APKs per ABI for smaller downloads
|
||||
splits {
|
||||
abi {
|
||||
isEnable = true
|
||||
reset()
|
||||
include("armeabi-v7a", "arm64-v8a")
|
||||
isUniversalApk = true // Also generate universal APK
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
42
android/app/proguard-rules.pro
vendored
42
android/app/proguard-rules.pro
vendored
@@ -19,3 +19,45 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
# OkHttp platform-specific SSL classes (optional dependencies)
|
||||
# These are platform-specific implementations that OkHttp uses optionally
|
||||
# We don't need them for Android, so we ignore warnings about missing classes
|
||||
-dontwarn org.bouncycastle.jsse.BCSSLParameters
|
||||
-dontwarn org.bouncycastle.jsse.BCSSLSocket
|
||||
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
|
||||
-dontwarn org.conscrypt.Conscrypt$Version
|
||||
-dontwarn org.conscrypt.Conscrypt
|
||||
-dontwarn org.conscrypt.ConscryptHostnameVerifier
|
||||
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
|
||||
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
|
||||
-dontwarn org.openjsse.net.ssl.OpenJSSE
|
||||
|
||||
# Sardine WebDAV library
|
||||
-keep class com.thegrizzlylabs.sardineandroid.** { *; }
|
||||
-dontwarn org.w3c.dom.ElementTraversal
|
||||
|
||||
# Keep WebDAV related classes
|
||||
-keepclassmembers class * {
|
||||
@com.thegrizzlylabs.sardineandroid.* *;
|
||||
}
|
||||
|
||||
# Coroutines
|
||||
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
||||
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
||||
-keepclassmembers class kotlinx.** {
|
||||
volatile <fields>;
|
||||
}
|
||||
|
||||
# Gson
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-dontwarn sun.misc.**
|
||||
-keep class com.google.gson.** { *; }
|
||||
-keep class * implements com.google.gson.TypeAdapter
|
||||
-keep class * implements com.google.gson.TypeAdapterFactory
|
||||
-keep class * implements com.google.gson.JsonSerializer
|
||||
-keep class * implements com.google.gson.JsonDeserializer
|
||||
|
||||
# Keep your app's data classes
|
||||
-keep class dev.dettmer.simplenotes.** { *; }
|
||||
Reference in New Issue
Block a user