You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, protodata-fat-cli-<version>.jartakes approximately 170-180 MB. And it obviously carries a lot of redundant things with it/
In scope of this task, we should try and append the shrinking step to the CI pipeline.
The idea is to use ProGuard along with its Gradle plugin.
Here is the preliminary ProGuard ruleset with which ProGuard 7.2.2 in its standalone mode completes the shrinking process:
-injars ./protodata-fat-cli-<version>.jar
-outjars ./protodata-fat-cli-<version>-out.jar
-libraryjars <YOUR_PATH_HERE>/zulu-11.jdk/Contents/Home/jmods/java.base.jmod(!**.jar;!module-info.class):<YOUR_PATH_HERE>/zulu-11.jdk/Contents/Home/jmods/java.desktop.jmod(!**.jar;!module-info.class)
-dontoptimize
-dontwarn
-dontobfuscate
# Uncomment if you want to see ~350K of warnings.
# -verbose
-keepattributes *Annotation*
-keepattributes Signature
-keepattributes InnerClasses
-keepattributes InnerClasses,EnclosingMethod
-keep class kotlin.Metadata
-keep,includedescriptorclasses class io.spine.** { *; }
-keep,includedescriptorclasses class com.google.common.** { *; }
-keep,includedescriptorclasses class com.google.protobuf.** { *; }
(where YOUR_PATH_HERE should be changed to the corresponding value).
The resulting JAR was NOT tested. But the size was down 177 MB -> 56.8 MB.
Another room for improvement is with the static resources . There are tons of these in our JAR. And ProGuard has no means to detect whether they are used.
⚠️ With the most recent version of ProGuard (7.6.0, as of the moment of writing), this issue arises.
The text was updated successfully, but these errors were encountered:
Right now,
protodata-fat-cli-<version>.jar
takes approximately 170-180 MB. And it obviously carries a lot of redundant things with it/In scope of this task, we should try and append the shrinking step to the CI pipeline.
The idea is to use ProGuard along with its Gradle plugin.
Here is the preliminary ProGuard ruleset with which ProGuard 7.2.2 in its standalone mode completes the shrinking process:
(where
YOUR_PATH_HERE
should be changed to the corresponding value).The resulting JAR was NOT tested. But the size was down 177 MB -> 56.8 MB.
Another room for improvement is with the static resources . There are tons of these in our JAR. And ProGuard has no means to detect whether they are used.
The text was updated successfully, but these errors were encountered: