build: clean up R8 keep rules and fix onramp error reporting#732
Merged
Conversation
Remove overly broad keep rules that prevent R8 from shrinking and optimizing large portions of the codebase: - Remove blanket keeps on com.flipcash.services.** and com.getcode.opencode.** (covered by hierarchy-based gRPC/Protobuf rules and kotlinx-serialization consumer rules) - Remove -keep class com.google.protobuf.** (Protobuf ships its own consumer rules; GeneratedMessageLite hierarchy rules remain) - Remove rules redundant with proguard-android-optimize.txt (native methods, R$* fields, SourceFile/LineNumberTable attributes) - Remove no-op org.json.** keeps (framework class, not in APK) - Remove -verbose and dead commented-out line - Tighten JNA keep with allowoptimization in consumer-rules.pro - Delete unused ed25519 proguard-rules.pro template - Remove android.r8.strictFullModeForKeepRules=false to enable strict full mode (default) - Widen exception keep from java.lang.Exception to java.lang.Throwable to cover CodeServerError and CoinbaseOnRampWebError subclasses
…egion error Pass data string as the Throwable message so Bugsnag displays the error body (JSON with errorCode and errorMessage) instead of blank. Also add AssetNotTradableInRegion error type for ERROR_CODE_ASSET_NOT_TRADABLE from the Coinbase onramp SDK.
Display the existing region mismatch error dialog when the Coinbase onramp returns ERROR_CODE_ASSET_NOT_TRADABLE.
androidx.biometric:biometric:1.4.0-alpha07 requires compileSdk 36.1+. Align library modules with the app module which already uses 37.
Replace Android.kt (buildSrc) with android-compileSdk, android-minSdk, android-targetSdk, and android-java entries in libs.versions.toml. This makes the values accessible from both build-logic convention plugins and module build scripts, eliminating the duplicate hardcoded values in AndroidLibraryConventionPlugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
com.flipcash.services.**,com.getcode.opencode.**,com.google.protobuf.**,org.json.**) that are redundant with hierarchy-based rules and library consumer rules, enabling R8 to shrink and optimize more of the codebaseallowoptimization, delete unused ed25519 proguard template, enable strict full modejava.lang.Exceptiontojava.lang.ThrowablesoCodeServerErrorandCoinbaseOnRampWebErrorsubclasses appear with real names in Bugsnag instead of obfuscated (ek0)dataas theThrowablemessage so Bugsnag displays the JSON error bodyAssetNotTradableInRegionerror type forERROR_CODE_ASSET_NOT_TRADABLEwith region mismatch UI alert