rudderlabs / rudder-sdk-android

Android SDK for RudderStack - the Customer Data Platform for Developers.
https://www.rudderstack.com
Other
18 stars 28 forks source link

BUG : Outdated ProGuard rules after migrating SQLCipher #430

Closed L-Andrade closed 1 month ago

L-Andrade commented 2 months ago

Describe the bug The app will not compile due to missing ProGuard rules. It's an issue since the migration of SQLCipher: https://github.com/rudderlabs/rudder-sdk-android/pull/419

To Reproduce Steps to reproduce the behaviour:

  1. Upgrade from an older version to the most recent version
  2. Try to do a release build

Compilation fails with:

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in (app module location)/build/outputs/mapping/devRelease/missing_rules.txt.

The missing_rules.txt contains:

-dontwarn net.zetetic.database.DatabaseErrorHandler
-dontwarn net.zetetic.database.sqlcipher.SQLiteDatabase$CursorFactory
-dontwarn net.zetetic.database.sqlcipher.SQLiteDatabase
-dontwarn net.zetetic.database.sqlcipher.SQLiteDatabaseHook
-dontwarn net.zetetic.database.sqlcipher.SQLiteOpenHelper

The consumer ProGuard rules still has the old packages of these classes and needs to be updated: https://github.com/rudderlabs/rudder-sdk-android/blob/develop/core/proguard-consumer-rules.pro

Expected behavior The app should compile without any changes necessary, as the library should deal with this on its own.

Version of the Android SDK Upgrading from v1.21.2 to v1.23.0

SDK initialisation snippet

RudderClient.getInstance(
    context,
    context.getString(R.string.rudderstack_key),
    RudderConfig.Builder().withDataPlaneUrl(context.getString(R.string.rudderstack_url)),
)

Check for Correct Usage of writeKey and dataPlaneUrl Yes, everything is correct and unchanged since we integrated v1.21.2 on our side.

1abhishekpandey commented 2 months ago

Hey @L-Andrade, Thanks for raising this issue. We will look into it.

1abhishekpandey commented 1 month ago

We have released the fix in v1.23.1. Please use this version.