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

build: Enable ProGuard #1650

Merged
merged 4 commits into from
Feb 15, 2024
Merged

build: Enable ProGuard #1650

merged 4 commits into from
Feb 15, 2024

Conversation

kitadai31
Copy link
Contributor

@kitadai31 kitadai31 commented Jan 23, 2024

Enable ProGuard like compose manager.

The size of release APK: 45.7MB -> 39.9MB (5.8MB reduced)

Motivation

5.8MB is not a small change.

Each version of ReVanced Manager is being downloaded 100,000-300,000 times.
5.8MB * 200,000 times = 1,160,000MB ≒ 1.1TB
So, this reduces 1.1TB of GItHub's traffic from each new versions.

Therefore, if you are planning to continue to release Flutter manager, I think this is effective.

Other

Also, this PR disables Jetifier.
because all dependent libraries support AndroidX. (checked by gradlew checkJetifier)
This solves this build error:

[Fatal Error] :-1:-1: Invalid byte 1 of 1-byte UTF-8 sequence.
WARNING: [XmlResourcesTransformer] Received malformed sequence exception when trying to detect the encoding for 'AndroidManifest.xml'. Defaulting to UTF-8.
WARNING: [XmlResourcesTransformer] javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
(followed by a very long stack trace...)

Test

I tested all features of ReVanced Manager and checked works correctly.
This change was already introduced on my fork ReVanced Manager a month ago, which is 2500 downloads, and any problems are not reported.

@kitadai31 kitadai31 requested a review from oSumAtrIX January 23, 2024 18:35
android/app/proguard-rules.pro Outdated Show resolved Hide resolved
android/app/proguard-rules.pro Outdated Show resolved Hide resolved
@validcube validcube requested a review from oSumAtrIX February 2, 2024 05:26
Copy link
Member

@validcube validcube left a comment

Choose a reason for hiding this comment

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

💫 Approved

@validcube validcube merged commit b754a04 into ReVanced:dev Feb 15, 2024
1 check passed
github-actions bot pushed a commit that referenced this pull request Feb 15, 2024
## Features
* Improve consistency on language selector ([Pun Butrach](b2119ce))
## Code Refactoring
* Check-in pubspec.lock ([Pun Butrach](5a24911))
## Build System
* Bump Gradle to v8.6 ([Pun Butrach](f57898a))
* Enable ProGuard (#1650) ([kitadai31](b754a04))
## Continuous Integration
* **build:** Upload build artifact ([Pun Butrach](e0c750d))
## Chores
* Update .gitignore ([Pun Butrach](0ec6897))
@kitadai31 kitadai31 deleted the enable-proguard branch March 25, 2024 07:09
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.

4 participants