jzbrooks / vgo

vector graphic optimization
MIT License
43 stars 2 forks source link

Keep class used in EnumMap #104

Closed jzbrooks closed 1 month ago

jzbrooks commented 1 month ago

Fixes #102

https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:sdk-common/src/main/java/com/android/ide/common/vectordrawable/SvgClipPathNode.java;l=140

If this class is stripped, the enum map constructor will throw an exception.

jzbrooks commented 1 month ago
vgo# diffuse diff --jar ~/Desktop/master.jar vgo-cli/build/libs/vgo.jar 
OLD: master.jar
NEW: vgo.jar

 JAR   │ old      │ new      │ diff  
───────┼──────────┼──────────┼───────
 class │  7.5 MiB │  7.5 MiB │ +97 B 
 other │  7.8 MiB │  7.8 MiB │   0 B 
───────┼──────────┼──────────┼───────
 total │ 15.3 MiB │ 15.3 MiB │ +97 B 

 CLASSES │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
 classes │  2960 │  2960 │ 0 (+0 -0) 
 methods │ 18446 │ 18446 │ 0 (+0 -0) 
  fields │  7839 │  7839 │ 0 (+0 -0) 

=================
====   JAR   ====
=================

 size  │ diff  │ path                                                           
───────┼───────┼────────────────────────────────────────────────────────────────
 747 B │ +97 B │ ∆ com/android/ide/common/vectordrawable/SvgNode$ClipRule.class 
───────┼───────┼────────────────────────────────────────────────────────────────
 747 B │ +97 B │ (total)