Add consumer proguard rules for SQLCipher (#138)

* Add consumer proguard rules for SQLCipher

* Add changelog

* Explain why these rules are necessary

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>

* Try to switch to a supported version of Compose Rules to avoid dependency issues

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
This commit is contained in:
Jorge Martin Espinosa
2023-03-06 19:40:05 +01:00
committed by GitHub
parent bc011d0444
commit e0bb1da258
5 changed files with 37 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ allprojects {
config = files("$rootDir/tools/detekt/detekt.yml")
}
dependencies {
detektPlugins("com.twitter.compose.rules:detekt:0.0.26")
detektPlugins("io.nlopez.compose.rules:detekt:0.1.2")
}
// KtLint

3
changelog.d/138.bugfix Normal file
View File

@@ -0,0 +1,3 @@
Add consumer proguard rules for SQLCipher.
Thanks @anoadragon453 for reporting and the tentative fix!

View File

@@ -20,6 +20,13 @@ plugins {
android {
namespace = "io.element.android.libraries.encrypteddb"
buildTypes {
release {
isMinifyEnabled = true
consumerProguardFiles("consumer-proguard-rules.pro")
}
}
}
dependencies {

View File

@@ -0,0 +1,25 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# Prevent ProGuard from renaming internal SQLCipher classes, which breaks the library.
# From https://github.com/sqlcipher/android-database-sqlcipher#proguard
-keep class net.sqlcipher.** { *; }

View File

@@ -103,7 +103,7 @@ comments:
UndocumentedPublicProperty:
active: false
TwitterCompose:
Compose:
CompositionLocalAllowlist:
active: true
# You can optionally define a list of CompositionLocals that are allowed here