Skip to content
Draft
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: 4 additions & 11 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,9 @@ android {
}
}
release {
isMinifyEnabled = false
isShrinkResources = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
optimization {
enable = true
}
signingConfig = signingConfigs.getByName("release")
ndk {
debugSymbolLevel = "FULL"
Expand Down Expand Up @@ -306,11 +303,7 @@ android {
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
freeCompilerArgs.addAll(
listOf(
"-XXLanguage:+PropertyParamAnnotationDefaultTargetMode",
)
)
freeCompilerArgs.add("-Xannotation-default-target=param-property")
}
}

Expand Down
7 changes: 1 addition & 6 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,4 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# btleplug (droidplug) Android Bluetooth support
# These classes are loaded via JNI from Rust code
-keep class com.nonpolynomial.btleplug.** { *; }

# jni-utils support library for btleplug
-keep class io.github.gedgygedgy.rust.** { *; }
# App keep rules live in src/main/keepRules/*.keep (AGP 9.3 optimization DSL).
3 changes: 3 additions & 0 deletions app/src/main/keepRules/bouncycastle.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Crypto replaces Android's BC provider with the app's BouncyCastleProvider.
# The provider registers SPI classes by name, including KeyStore.BKS used by Conscrypt.
-keep class org.bouncycastle.** { *; }
41 changes: 41 additions & 0 deletions app/src/main/keepRules/jni.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# btleplug (droidplug) JNI types constructed from native. Local AAR ships no consumer rules.
-keep class com.nonpolynomial.btleplug.android.impl.Adapter {
<init>(...);
*;
}
-keep class com.nonpolynomial.btleplug.android.impl.Adapter$* {
<init>(...);
*;
}
-keep class com.nonpolynomial.btleplug.android.impl.Peripheral {
<init>(...);
*;
}
-keep class com.nonpolynomial.btleplug.android.impl.Peripheral$* {
<init>(...);
*;
}
-keep class com.nonpolynomial.btleplug.android.impl.ScanFilter {
<init>(...);
*;
}
-keep class com.nonpolynomial.btleplug.android.impl.*Exception {
<init>(...);
*;
}

# jni-utils JNI glue used by btleplug. Local JAR ships no consumer rules.
-keep class io.github.gedgygedgy.rust.** {
<init>(...);
*;
}

# libjnidispatch looks up Pointer.peer and other JNA members by JNI name.
# net.java.dev.jna ships no consumer keep rules.
-keep class com.sun.jna.** { *; }

# JNA reads @Structure.FieldOrder and constructs ByValue/ByReference reflectively.
# Library consumer rules use -keepclassmembers, which does not keep the annotation.
-keep @com.sun.jna.Structure$FieldOrder class * { *; }
-keep class * extends com.sun.jna.Structure { *; }
-keep class * implements com.sun.jna.Callback { *; }
6 changes: 6 additions & 0 deletions app/src/main/keepRules/uniffi.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# UniFFI JNA bindings. Library consumer rules keep members but still allow
# R8 to rename UniffiLib/FfiConverter types, which ClassCastExceptions on load.
-keep class com.synonym.vssclient.** { *; }
-keep class com.synonym.bitkitcore.** { *; }
-keep class com.synonym.paykit.** { *; }
-keep class org.lightningdevkit.ldknode.** { *; }
1 change: 1 addition & 0 deletions changelog.d/next/1184.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Release builds now shrink unused code and resources with R8.
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ activity-compose = { module = "androidx.activity:activity-compose", version = "1
appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.1" }
barcode-scanning = { module = "com.google.mlkit:barcode-scanning", version = "17.3.0" }
biometric = { module = "androidx.biometric:biometric", version = "1.4.0-alpha05" }
bitkit-core = { module = "com.synonym:bitkit-core-android", version = "0.5.5" }
paykit = { module = "com.synonym:paykit-android", version = "0.1.0-rc43" }
bitkit-core = { module = "com.synonym:bitkit-core-android", version = "0.5.9" }
paykit = { module = "com.synonym:paykit-android", version = "0.1.0-rc47" }
bouncycastle-provider-jdk = { module = "org.bouncycastle:bcprov-jdk18on", version = "1.83" }
camera-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "camera" }
camera-lifecycle = { module = "androidx.camera:camera-lifecycle", version.ref = "camera" }
Expand Down Expand Up @@ -64,7 +64,7 @@ ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
ldk-node-android = { module = "com.synonym:ldk-node-android", version = "0.7.0-rc.63" }
ldk-node-android = { module = "com.synonym:ldk-node-android", version = "0.7.0-rc.64" }
lifecycle-process = { group = "androidx.lifecycle", name = "lifecycle-process", version.ref = "lifecycle" }
lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycle" }
lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }
Expand All @@ -89,7 +89,7 @@ test-junit-ext = { module = "androidx.test.ext:junit", version = "1.3.0" }
test-mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version = "6.2.2" }
test-robolectric = { module = "org.robolectric:robolectric", version = "4.16.1" }
test-turbine = { group = "app.cash.turbine", name = "turbine", version = "1.2.1" }
vss-client = { module = "com.synonym:vss-client-android", version = "0.5.23" }
vss-client = { module = "com.synonym:vss-client-android", version = "0.5.24" }
webkit = { module = "androidx.webkit:webkit", version = "1.16.0" }
work-runtime-ktx = { module = "androidx.work:work-runtime-ktx", version = "2.11.0" }
zxing = { module = "com.google.zxing:core", version = "3.5.4" }
Expand Down
Loading