revanced-cli icon indicating copy to clipboard operation
revanced-cli copied to clipboard

build: exclude aapt1 binary, minimize revanced-library

Open kitadai31 opened this issue 5 months ago • 6 comments

First, exclude aapt1 binaries. aapt1 is never used in ReVanced CLI, but accounts for 10% of the jar size.

Second, specify app.revanced:revanced-patcher explicitly in the minimize block, because revanced-library does not need to be excluded from minimization. Since ReVanced Library was born, exclude(dependency("app.revanced:.*")) has been excluding revanced-library from minimization unintentionally. (This line exists before ReVanced Library was created.)

I tested patching, list patches, list versions, mount/unmount, and install/uninstall. It worked as expected.

Finally, remove exclude(dependency("org.jetbrains.kotlin:.*")) as it has no effect. Removing or adding this line made no difference.

This PR reduces the jar size as follows: Removing aapt1: 49.9 MB -> 44.8 MB Optimize minimization: 44.8 MB -> 40.3 MB

kitadai31 avatar Sep 02 '24 07:09 kitadai31