Skip to content
Merged
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
15 changes: 10 additions & 5 deletions src-tauri/gen/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,16 @@ android {
}
}
getByName("release") {
// R8 off: it barely shrinks this app (size is the native .so libs, which
// release strips regardless) and can rename/remove JNI-called Kotlin
// (nativeInit, VoltiusKeychain) → launch crash. Keep behavior identical
// to the on-device-verified debug build; only signing/debuggable differ.
isMinifyEnabled = false
// R8 shrinks and obfuscates the libraries (Play flags unobfuscated DEX).
// Rust calls our Kotlin by name over JNI (VoltiusKeychain, VoltiusBiometric,
// VoltiusTunnelService, ...), so proguard-rules.pro keeps com.voltius.app
// whole; Tauri's own classes are kept by the rules its library ships.
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
"proguard-tauri.pro",
)
// Only attach the release signing config when CI provided a keystore;
// otherwise leave unsigned so a local `release` build still completes.
if (System.getenv("ANDROID_KEYSTORE_PATH") != null) {
Expand Down
28 changes: 10 additions & 18 deletions src-tauri/gen/android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# 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
# Release builds run R8 (see build.gradle.kts).

# 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 *;
#}
# Rust looks up these classes and methods by name over JNI, and the WebView reaches
# some through @JavascriptInterface: R8 must not rename or remove any of them.
-keep class com.voltius.app.** { *; }
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod,SourceFile,LineNumberTable

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# Readable stack traces in Play crash reports (the mapping file is uploaded with the AAB).
-renamesourcefileattribute SourceFile

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# Tink (via androidx.security:security-crypto) references compile-only annotations.
-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.concurrent.GuardedBy
Loading