Skip to content

fix(proguard): scope protobuf keep rule to SDK-generated messages#975

Open
adrian-niculescu wants to merge 1 commit into
livekit:mainfrom
adrian-niculescu:fix/proguard-protobuf-keep-scope
Open

fix(proguard): scope protobuf keep rule to SDK-generated messages#975
adrian-niculescu wants to merge 1 commit into
livekit:mainfrom
adrian-niculescu:fix/proguard-protobuf-keep-scope

Conversation

@adrian-niculescu

@adrian-niculescu adrian-niculescu commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

The protobuf keep rule matched class * extends GeneratedMessageLite, so it keeps <fields> for every protobuf message in the consuming app, including the app's own protos and unrelated protobuf-using libraries. A consumer rule should only keep what the SDK itself needs.

This scopes it to livekit.** for the SDK's generated messages and com.google.protobuf.** for the well-known types they embed (Timestamp and friends). protobuf-javalite resolves those fields reflectively by name, so both scopes are required.

Tested by deploying an optimized release build of an app that uses the SDK to real devices on Android 13 and Android 17 (latest beta). LiveKit worked as expected with these changes.

The rule matched every GeneratedMessageLite subclass in the consuming
app, keeping fields for the app's own protos and unrelated protobuf
libraries. Scope it to livekit.** and the com.google.protobuf.**
well-known types the SDK's messages embed.
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1738e0f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
client-sdk-android Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant