Skip to content

2.0.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 26 Nov 22:04
· 7 commits to main since this release
8f05ecc

Introducing svg-to-compose Gradle Plugin

This release builds upon the svg-to-compose CLI tool code, turning it into a library, where you can use it via script as you are used to, or include it into your project, as a KMP library that parsers and generates code for you.

This release sets a big milestone in this project, evolving the project from only a KMP CLI tool to a KMP library, with a native CLI, and a Gradle Plugin.

The new svg-to-compose-gradle-plugin project was designed to simplify and enhance your workflow by automatically converting SVG/XML files into Jetpack Compose ImageVector assets. It adds seamless integration with your build process, enabling you to have a single source of truth for your vectors, which could be shared between teams like design and developers, making vector asset management easier than ever.

Additionally, we have introduced a few more options to the CLI tool such as --exclude, and --map-icon-from-to and removed the deprecated option context-receiver.

Documentation & Feedback

Check out the complete documentation here: svg-to-compose-gradle-plugin.

We value your feedback! If you encounter any issues or have suggestions for additional SVG feature support, please open an issue.

What's Changed

Breaking Changes

  • Removed deprecated flags -cp and --context-provider from the CLI tool.
  • The --kmp option, in the CLI, now is used to identify that the output targets KMP. That will change the Preview imports to use JetBrains instead.

Features

  • Introduce the svg-to-compose-gradle-plugin.
  • Added Dokka integration.
  • Introduced new CLI options for parser configuration:
    • --exclude: A regex used to exclude some icons from the parsing.
    • --map-icon-name-from-to, --from-to, or --rename: Replace the icon's name first value of this parameter with the second.
    • --silent: Runs the CLI without any output.
      See the svg-to-compose documentation for more details.

Bug fixes

  • RGB colors to Hex broken when RGB value results in a hex value started with 0.

Refactors

  • Enhanced logging capabilities with a new Logger interface.
  • Abstracting usage of okio.FileSystem with FileManager interface for better maintainability.
  • Refactored temporary file creating logic for better parsing handling.
  • Replaced com.codingfeline.buildkonfig:buildkonfig-gradle-plugin with com.github.gmazzo.buildconfig:plugin.

Chores

Full Changelog: v1.3.3...2.0.0