Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update R8/ProGuard section of README.md #635

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

connyduck
Copy link

closes #572

Signed-off-by: Konrad Pozniak <connyduck@users.noreply.github.com>
Copy link
Contributor

@Unpublished Unpublished left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion on this.

I think some breakages in downstream apps caused by obfuscation could be fixed in this library. But would require a lot effort/time to narrow down.

Thats why I personally wouldn't advertise using "will automatically work without additional app level rules".

This is partially covered with line 286, though.

@connyduck
Copy link
Author

Are there known breakages in downstream apps? For the two apps I worked with it was fine.

@Unpublished
Copy link
Contributor

The news app had crashes related to sso with obfuscation enabled last time I tested.

In case you try to reproduce:
I removed too broad rules like "keep all classes in all nextcloud news packages"

@connyduck
Copy link
Author

connyduck commented Jan 31, 2024

I built the news-android app without -dontobfuscate. The resulting apk is about 7% smaller (4965kB vs 5319kB) and works just fine (as far as I can tell with my Nextcloud setup). I don't see any rules I'd call too broad.

@Unpublished
Copy link
Contributor

I'd call -keep class de.luhmer.** { *; } too broad. But if it works now, fine 👍

@connyduck
Copy link
Author

Oh that are the application classes, I was looking for com.nextcloud, my bad. Here is a suggestion to improve the situation:
nextcloud/news-android#1382

Copy link
Contributor

@Unpublished Unpublished left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there are no known broken downstream apps anymore this can be merged

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.

Readme contains bad R8 advice
2 participants