- Turn on minification for the release build and sign it with the debug key so it is installable for testing (a public release would use a dedicated keystore). - proguard-rules.pro keeps the reflection-heavy mail/auth stack: Jakarta/Angus Mail (IMAP/SMTP providers resolved via reflection + service files) and AppAuth. - Verified on the Android 17 emulator: the release APK builds with R8, installs, and syncs mail over IMAP — confirming Angus Mail's provider resolution survives shrinking. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
789 B
Prolog
20 lines
789 B
Prolog
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
# R8/ProGuard keep rules for LibreMail's release build.
|
|
|
|
# --- Jakarta / Angus Mail (IMAP/SMTP) ---
|
|
# Protocol providers (IMAP/SMTP stores and transports) are discovered via reflection and
|
|
# META-INF service files, so keep the mail and activation classes and their members intact.
|
|
-keep class jakarta.mail.** { *; }
|
|
-keep class jakarta.activation.** { *; }
|
|
-keep class org.eclipse.angus.mail.** { *; }
|
|
-keep class org.eclipse.angus.activation.** { *; }
|
|
-dontwarn jakarta.mail.**
|
|
-dontwarn jakarta.activation.**
|
|
-dontwarn org.eclipse.angus.**
|
|
-dontwarn com.sun.activation.**
|
|
|
|
# --- AppAuth ---
|
|
# AppAuth (de)serializes its models (AuthState, token responses) reflectively.
|
|
-keep class net.openid.appauth.** { *; }
|
|
-dontwarn net.openid.appauth.**
|