-
Notifications
You must be signed in to change notification settings - Fork 3
Description
What about adding watchface.xml minify tool? I think WFS uses something similar before bundling watchface.aab.
I wrote a Kotlin based solution for watchface.xml minification. Performance gains are marginal, of course, with wff xml minification, but it may help with watch face loading speeds slightly, when the comments, white spaces, etc. are removed.
Maybe some more methods to remove redundant (default) attributes like alpha="255", pivotX/Y="0.5", etc could be added in the future?
wff-minify.jar takes watchface.xml absolute path and rewrites the file at the moment. I'm currently speculating about the way how to properly implement it to the gradle build process.
Do you think something like this would be useful to have in wff-optimizer repo?
Attaching compiled jar, source code & difference between untouched / minified watchface.xml.
wff-minify.zip
Usage: java -jar wff-minify.jar <XML file path>