diff --git a/apps/flipcash/app/proguard-rules.pro b/apps/flipcash/app/proguard-rules.pro index c9ac58d40..a97a0d11a 100644 --- a/apps/flipcash/app/proguard-rules.pro +++ b/apps/flipcash/app/proguard-rules.pro @@ -7,15 +7,13 @@ -keepnames class com.flipcash.app.core.AppRoute -keepnames class com.flipcash.app.core.AppRoute$** -# Protobuf — keep all generated message classes and their builders. -# Using type-hierarchy rules so new packages / updated gRPC stubs are -# caught automatically instead of listing every gen package. --keep class * extends com.google.protobuf.GeneratedMessageLite { *; } --keep class * extends com.google.protobuf.GeneratedMessageLite$Builder { *; } +# Protobuf keep rules ship with the contract packages themselves, from 0.3.0 on: +# com.flipcash:{ocp,flipcash2}-client-protocol carry them in META-INF/proguard/, which +# R8 reads straight out of the jar. Downgrading either pin below 0.3.0 silently removes +# the app's only protobuf keep rule. -# gRPC — keep generated service stubs (abstract + concrete) +# gRPC — keep the generated client stubs -keep class * extends io.grpc.stub.AbstractStub { *; } --keep class * implements io.grpc.BindableService { *; } # Keep our scan classes that interact with native. The scanner's JNI constructs # these from C++ by name (FindClass("com/kik/scan/UsernameKikCode"), GetMethodID diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 31ef5f56f..c7d8c5155 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -66,8 +66,10 @@ protovalidate-kt = "0.1.1" # Generated client SDKs for the two backend contracts. Separate versions on purpose: the # protos are independent (flipcash2 does not import ocp), so the packages move on their own # cadence and there is nothing to keep aligned. -ocp-client-protocol = "0.2.0" -flipcash2-client-protocol = "0.2.0" +# 0.3.0 is the first release of either package to ship R8 keep rules for its generated +# messages, which is what lets proguard-rules.pro drop its own. +ocp-client-protocol = "0.3.0" +flipcash2-client-protocol = "0.3.0" # The Android port is the ONLY libphonenumber this app depends on, deliberately. Google's # `com.googlecode` artifact used to sit alongside it; the two ship separate copies of the metadata,