Convert svg to VectorDrawable xml at compile time?

Viewed 56

We convert SVG into the simpler VectorDrawable format all the time for use in Android, but soon it becomes a maintenance issue and we never know if a VectorDrawable is up to date.

One way to do that is to keep the SVG in the source repo, but gitignore the VectorDrawable XML files; then to write a Makefile to generate the needed XML files. But given gradle is doing the same job as Makefile, there might be a better gradle way to do so?

It is desirable if we can skip the creation of VectorDrawable XML in source (i.e. build/intermediate would be great).

I am not looking for libraries to render SVG files at runtime. Just something to streamline the SVG-update -> Drawable XML update process, so developers can focus on coding instead of managing resources.Thanks!

0 Answers
Related