Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,9 @@ yarn-error.log
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Local APK size analysis tooling (downloaded binaries)
tools/bundletool*.jar
tools/binaryen/

docs/app-release*.apk
35 changes: 32 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ react {
}

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
* Set this to true to Run Proguard/R8 on Release builds to minify the Java bytecode.
* Keep rules live in proguard-rules.pro. Re-measure with scripts/analyzeApkSize.ts
* after flipping this; smoke-test all wallet types before shipping.
*/
def enableProguardInReleaseBuilds = false
def enableProguardInReleaseBuilds = true

/**
* The preferred build flavor of JavaScriptCore (JSC)
Expand Down Expand Up @@ -100,6 +102,11 @@ android {

// Edge addition:
multiDexEnabled true
// Keep only locales we ship strings for (see src/locales/strings).
// Drops the long tail of AndroidX / Play Services translated resources.
resourceConfigurations += [
'en', 'de', 'es', 'fr', 'it', 'ja', 'ko', 'pt', 'ru', 'vi', 'zh'
]
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a' // Exclude Intel
}
Expand Down Expand Up @@ -172,6 +179,7 @@ android {
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
shrinkResources enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
Expand Down Expand Up @@ -252,7 +260,28 @@ if (hasProperty('storeFile')) {
android.signingConfigs.release.keyPassword = "password"
}

// Integrate react-native-vector-icons fonts
// Integrate react-native-vector-icons fonts.
// FontAwesome6_* is never imported from src/; omit it to save ~300 KB compressed.
project.ext.vectoricons = [
iconFontNames: [
'AntDesign.ttf',
'Entypo.ttf',
'EvilIcons.ttf',
'Feather.ttf',
'FontAwesome.ttf',
'FontAwesome5_Brands.ttf',
'FontAwesome5_Regular.ttf',
'FontAwesome5_Solid.ttf',
'Fontisto.ttf',
'Foundation.ttf',
'Ionicons.ttf',
'MaterialCommunityIcons.ttf',
'MaterialIcons.ttf',
'Octicons.ttf',
'SimpleLineIcons.ttf',
'Zocial.ttf'
]
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

import io.sentry.android.gradle.extensions.InstrumentationFeature
Expand Down
89 changes: 79 additions & 10 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,10 +1,79 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:
# Edge React GUI — R8 / ProGuard keep rules
# Enabled when minifyEnabled=true in android/app/build.gradle.
# These rules aim to keep reflection / JNI entry points used by React Native,
# Hermes, Firebase, Sentry, and the Zcash / Pirate native SDKs.

# ---- React Native / Hermes / JNI ----
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.proguard.annotations.DoNotStrip *;
}
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
void set*(***);
*** get*();
}
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * {
native <methods>;
}
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
-keep class com.facebook.react.turbomodule.** { *; }
-keep class com.facebook.hermes.unicode.** { *; }
-keep class com.facebook.jni.** { *; }
-keep class com.facebook.hermes.intl.** { *; }

# ---- OkHttp / Okio (RN networking) ----
-dontwarn okhttp3.**
-dontwarn okio.**
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }

# ---- Firebase / Google Play Services ----
-keep class com.google.firebase.** { *; }
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.firebase.**
-dontwarn com.google.android.gms.**

# ---- Sentry ----
-keep class io.sentry.** { *; }
-dontwarn io.sentry.**

# ---- Zcash / Pirate protobuf + gRPC (reflection-heavy) ----
-keep class cash.z.** { *; }
-keep class co.electriccoin.** { *; }
-keep class pirate.** { *; }
-keep class com.google.protobuf.** { *; }
-keep class io.grpc.** { *; }
-dontwarn com.google.protobuf.**
-dontwarn io.grpc.**
-dontwarn com.google.common.**

# ---- Guava (pulled by Zcash / work-runtime) ----
-dontwarn com.google.common.**
-keep class com.google.common.** { *; }

# ---- Pirate SDK optional kotlinx.datetime refs (not on classpath) ----
-dontwarn kotlinx.datetime.Clock$System
-dontwarn kotlinx.datetime.Clock
-dontwarn kotlinx.datetime.Instant

# ---- Expo modules ----
-keep class expo.modules.** { *; }
-dontwarn expo.modules.**

# ---- Vision Camera / ML Kit ----
-keep class com.mrousavy.camera.** { *; }
-keep class com.google.mlkit.** { *; }
-dontwarn com.google.mlkit.**

# ---- Reanimated / Gesture Handler ----
-keep class com.swmansion.reanimated.** { *; }
-keep class com.swmansion.gesturehandler.** { *; }

# ---- Keep line numbers for crash reports ----
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
138 changes: 138 additions & 0 deletions docs/apkAccountbasedDupes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
{
"generatedAt": "2026-08-06T04:24:47.579Z",
"multiVersionCount": 153,
"interesting": [
{
"name": "@noble/hashes",
"versions": [
"1.3.1",
"1.3.2",
"1.6.0",
"1.6.1",
"1.7.1",
"1.8.0"
]
},
{
"name": "@noble/curves",
"versions": [
"1.1.0",
"1.7.0",
"1.8.1",
"1.9.7"
]
},
{
"name": "axios",
"versions": [
"0.18.1",
"0.21.4",
"0.26.1",
"1.13.5"
]
},
{
"name": "readable-stream",
"versions": [
"2.3.7",
"2.3.8",
"3.6.2",
"4.7.0"
]
},
{
"name": "bs58",
"versions": [
"4.0.1",
"5.0.0",
"6.0.0"
]
},
{
"name": "@types/bn.js",
"versions": [
"4.11.6",
"5.1.5",
"5.2.0"
]
},
{
"name": "secp256k1",
"versions": [
"3.5.2",
"4.0.3",
"5.0.0"
]
},
{
"name": "protobufjs",
"versions": [
"6.11.4",
"7.2.6"
]
},
{
"name": "@scure/bip32",
"versions": [
"1.3.1",
"1.6.0"
]
},
{
"name": "@scure/bip39",
"versions": [
"1.2.1",
"1.5.0"
]
},
{
"name": "bn.js",
"versions": [
"4.12.3",
"5.2.1"
]
},
{
"name": "elliptic",
"versions": [
"6.5.4",
"6.6.1"
]
},
{
"name": "safe-buffer",
"versions": [
"5.1.2",
"5.2.1"
]
},
{
"name": "bs58check",
"versions": [
"2.1.2",
"3.0.1"
]
},
{
"name": "bip32",
"versions": [
"2.0.6",
"4.0.0"
]
},
{
"name": "typed-array-buffer",
"versions": [
"1.0.2",
"1.0.3"
]
},
{
"name": "typedarray-to-buffer",
"versions": [
"3.1.5",
"4.0.0"
]
}
]
}
Loading
Loading