Skip to content

wff-optimizer: Add XML minify #81

@amoledwatchfaces

Description

@amoledwatchfaces

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?

@alexclarke-g @garanj

Attaching compiled jar, source code & difference between untouched / minified watchface.xml.
wff-minify.zip

Usage: java -jar wff-minify.jar <XML file path>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions