{"id":34314055,"url":"https://github.com/avianey/androidsvgdrawable-plugin","last_synced_at":"2025-12-17T10:49:43.836Z","repository":{"id":12605236,"uuid":"15276235","full_name":"avianey/androidsvgdrawable-plugin","owner":"avianey","description":"Gradle plugin that generates qualified, density specific PNG drawables from SVG files at build time for your Android projects.","archived":false,"fork":false,"pushed_at":"2023-04-22T16:31:34.000Z","size":591,"stargazers_count":262,"open_issues_count":16,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-20T23:27:07.353Z","etag":null,"topics":["android","android-sdk","gradle-plugin","jpeg","png","svg"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avianey.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-12-18T07:06:29.000Z","updated_at":"2024-09-11T06:22:14.000Z","dependencies_parsed_at":"2025-07-20T23:27:17.144Z","dependency_job_id":"53b047ac-d4a6-4bb8-962a-a287a961bd5e","html_url":"https://github.com/avianey/androidsvgdrawable-plugin","commit_stats":null,"previous_names":["avianey/androidgendrawable-maven-plugin"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/avianey/androidsvgdrawable-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avianey%2Fandroidsvgdrawable-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avianey%2Fandroidsvgdrawable-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avianey%2Fandroidsvgdrawable-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avianey%2Fandroidsvgdrawable-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avianey","download_url":"https://codeload.github.com/avianey/androidsvgdrawable-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avianey%2Fandroidsvgdrawable-plugin/sbom","scorecard":{"id":218078,"data":{"date":"2025-08-11","repo":{"name":"github.com/avianey/androidsvgdrawable-plugin","commit":"49c0a3d279c6a6795bf9509b1e3f6353ed2131c4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T02:00:00.991Z","repository_id":12605236,"created_at":"2025-08-17T02:00:00.991Z","updated_at":"2025-08-17T02:00:00.991Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27781947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-sdk","gradle-plugin","jpeg","png","svg"],"created_at":"2025-12-17T10:49:43.306Z","updated_at":"2025-12-17T10:49:43.828Z","avatar_url":"https://github.com/avianey.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Android SVG Drawable plugin\n=========================\n\n[![Build Status](https://travis-ci.org/avianey/androidsvgdrawable-plugin.png?branch=master)](https://travis-ci.org/avianey/androidsvgdrawable-plugin)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/fr.avianey.androidsvgdrawable/gradle-plugin/badge.svg)](https://maven-badges.herokuapp.com/maven-central/fr.avianey.androidsvgdrawable/gradle-plugin)  \n\nEvery Android application should provide [alternative resources](http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources) to support specific device configurations such as `portrait`, `landscape`, `small`, `large`, `us`, `fr`, ... Because we don't want to edit ~~thousands of~~ several images every time we need to change a single pixel, a color, a shadow size or a text value, this  plugin generates for you **density specific** bitmap drawable resources from qualified SVG files **at build time**.  \n\nThe only thing you have to do is to provide one or more qualified SVG files that will be converted for you at build time into as many as needed bitmaps and organized into configuration-specific drawable directories... at least one for each targeted screen density ! You'll never deal with raster resources anymore...\n\nThis plugin handles any configuration `\u003cqualifier\u003e` supported by the Android SDK and can generate [NinePatch](http://developer.android.com/reference/android/graphics/NinePatch.html) drawable as well. To increase your productivity, a (incubating) mask functionality allow you to define generic layers, filters, clip-path, etc...  and let you reuse them across multiple SVG files. That's [DRY](http://en.wikipedia.org/wiki/Don%27t_repeat_yourself)  applied to Android drawable resources. \n\nEnjoy :wink: !\n\n-   [Gradle quick start](#gradle)\n-   [Maven quick start](#maven)\n-   [How to use](#how-to-use)\n    -   [Input SVG files](#input-svg-files)\n        -   [Expected SVG file names](#expected-file-names)\n        -   [SVG Bounding Box](#bounding-box)\n        -   [Adjusting the Bounding Box](#adjusting-the-bounding-box)\n        -   [Generated bitmaps](#generated-bitmaps)\n    -   [Nine-Patch support](#nine-patch-support)\n    -   [SVG Masking](#svg-masking)\n        -   [MASK file format](#mask-file-format)\n        -   [Generated MASKED files](#generated-mask-files)\n    -   [Plugin options](#plugin-options)\n\t    -   [Options list](#options-list)\n\t    -   [Typical Gradle configuration](#typical-gradle-configuration)\n\t    -   [Typical Maven configuration](#typical-maven-configuration)\n-   [Best practices](#best-practices)\n-   [Who's using it](#whos-using-it)\n-   [License](#license)\n\n\n:warning: Read CHANGELOG.md when upgrading the plugin version\n\n## Gradle\n\nAdd maven central repository and the plugin reference to your build script :\n\n```gradle\nbuildscript {\n    repositories {\n        jcenter()\n        mavenCentral()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:1.3.1'\n        classpath('fr.avianey.androidsvgdrawable:gradle-plugin:+') {\n            // should be excluded to avoid conflict\n            exclude group: 'xerces'\n        }\n    }\n}\n```\n\nYou can configure one or more Task with the desired configuration into your build.gradle and apply the `androidsvgdrawable` plugin. Tasks will be executed for you when necessary to generate drawable resources :\n\n```gradle\napply plugin: 'com.android.application'\napply plugin: \"androidsvgdrawable\"\n\n// create a task to convert SVG to PNG\ntask svgToPng(type: fr.avianey.androidsvgdrawable.gradle.SvgDrawableTask) {\n    // configuration, see sample project\n}\n```\nIf you don't want the plugin to execute the task automatically, you can call your task directly through Gradle :  \n\n ```\ngradlew svgToPng\n ```\n \nYou can define as many task as you need.\n\n## Maven\n\nAdd the plugin to your pom.xml :\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003efr.avianey.androidsvgdrawable\u003c/groupId\u003e\n    \u003cartifactId\u003emaven-plugin\u003c/artifactId\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003egendrawable-png\u003c/id\u003e\n            \u003cconfiguration\u003e\u003c!-- see sample project --\u003e\u003c/configuration\u003e\n            \u003cphase\u003einitialize\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003egen\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\nThe plugin `gen` mojo can also be executed on demand through its goal prefix :\n```\nmvn svgdrawable:gen\n```\n\n## How to use\n\nThe key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\", \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\",  \"MAY\", and \"OPTIONAL\" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt).\n\n### Input SVG files \n\nThis plugin is based on [Apache Batik 1.7](http://xmlgraphics.apache.org/batik/) and thus supports most of the [SVG 1.1 Specification](http://www.w3.org/TR/SVG11/). See the [Batik status page](http://xmlgraphics.apache.org/batik/status.html) for the list of supported, not-supported and partially supported SVG 1.1 features.\n\n#### Expected file names\n\nInput SVG file names **MUST** match the following pattern : `\\w+(-{qualifier})+.svg`. It is composed of three parts :\n\n1.  `\\w+` is the SVG *unqualified* name part\n2.  `(-{qualifier})+` is the SVG *qualified* name part\n3.  `.svg` is the extension of the file\n\nEach SVG file **MUST** provide a valid reference density qualifier in its name. The generated bitmap (JPG or PNG) will be scaled relatively to its reference density. The generated bitmap for the reference density will have the same dimensions as defined by the [SVG bounding box](#bounding-box).  \n\nQualifiers can appear in any order within the SVG file name. The plugin takes care of re-ordering the qualifiers properly as expected by the Android SDK. For a full list of supported qualifiers, see [Providing Alternative Resources](http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources) on the Android developper website.\n\nExample of valid SVG file name :\n\n-   `icon-mdpi.svg`\n-   `flag-fr-land-mdpi.svg`\n-   `flag-fr-land-w64mdpi.svg`\n-   `more_complex_name-land-mdpi-fr-sw700dp.svg`  \n\nExample of invalid SVG file name :\n\n-  `icon.svg`\n\t-  no qualifier at all\n-  `flag-fr.svg`\n\t-  no density qualifier\n-  `invalid-classifier-mdpi.svg`\n\t-  `classifier` is not a valid Android resource qualifier\n-  `éléphant-mdpi.svg`\n\t-  invalide `\\w` character in the *unqualified* name part\n\n#### Bounding Box\n\nAs explained above, each input SVG file name **MUST** provide a density qualifier. This qualifier is used to compute the scaled `width` and `height` of the generated bitmaps. The reference `width` and `height` for the reference density are those defined by the `width` and `height` attributes of the `\u003csvg\u003e` root element of the input SVG file :\n\n```xml\n\u003csvg\n   x=\"0\"\n   y=\"0\"\n   width=\"96\"\n   height=\"96\"\n```\n\t  \nThis will define the bounding box of the drawable content. Everything that is drawn outside off this bounding box will not be rendered in the generated bitmaps. `x` and `y` attributes are default to `0px` if not present. \n\nInkscape provides a way to make the SVG bounding box match the content of the document :  \n\n1.  Open File \u003e Document Properties `[CTRL]`+`[SHIFT]`+`[D]`\n2.  In the Page tab select Page Size \u003e Custom Size \u003e Resize page to content\n\nIf you want the bounding box to be larger than the content (with extra border), you'll need to add an extra transparent shape that is larger than the content and that match the desired width and height before using this tip.  \n  \nYou **SHOULD** adjust your input SVG file `width` and `height` to be a multiple of `32` and set its reference density to `mdpi` so they can be scaled to any density without rounding the bounding box. The `width` and `height` attributes of the `\u003csvg\u003e` element are rouded (when necessary) to the smallest integer that is greater than or equal to the value of the scaled attribute. You **SHOULD** use round integer values expressed in pixels `px` or without unit of length as much as possible...   \n\nIt's also possible to use valid SVG unit of length such as `mm`, `cm`, `pt`, `in`. Use it with caution :-).  \n\n#### Adjusting the Bounding Box\n\nIf you don't want to adjust your input SVG file `width` and `height` you can use a **constrained** density qualifier that will adjust the input SVG border to the given size in pixels.  \n  \nGiven the following SVG file you don't want to edit :\n\n```xml\n\u003csvg\n   x=\"0\"\n   y=\"0\"\n   width=\"500\"\n   height=\"500\"\n```\n\nYou can adjust it to be 32 pixels width or height at the `mdpi` density by changing its name to :\n\n-   `name-w32mdpi.svg`\n-   `name-h32mdpi.svg`\n\nThis will force the given size in pixel for the output drawable width or height at the specified density (preserving the aspect ratio of the SVG Bounding Box). Output drawable for other densities will be scaled regarding the **constrained** size specified in the SVG file name instead of the size specified in the `width` and `height` attribute of the `\u003csvg\u003e` element.\n\n#### Generated bitmaps\n\nThe generated bitmaps are named against `\\w+.png`, `\\w+.jpg` or `\\w+.9.png` if it's a nine-patch drawable and are generated into a `/res/drawable(-{qualifier})*` directory where :  \n\n-   `\\w+` is the *unqualified* part of the input SVG file\n-   `(-{qualifier})*` is the re-ordered *qualified* part of the input SVG file minus the density qualifier\n\n#### Nine-Patch support\n\nIf you want to generate bitmaps as NinePatch Drawable, you **MUST** provide Nine-Patch configuration file that specifies the **stretchable area** and the **padding box** as defined in the Android documentation related to [nine-patch](http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch). The Nine-Patch configuration file consists in a JSON Array containing at least one entry :\n\n```javascript\n[\n    {\n        \"name\" : \"phone.*\",  // unqualified part of the SVG file name (JAVA regexp)\n        \"qualifiers\" : [ // optionnal array of qualifiers to filter input SVG \n            \"land\" // this config applies only to \\w+.*-land.*.svg files\n        ], \n        \"stretch\" : { // the stretchable area configuration\n            \"x\" : [ // segments of the top edge of the NinePatch\n                [3, 43],\n\t\t\t\t... // you can add as many segments as you want\n            ],\n            \"y\" : [ // segments of the left edge of the NinePatch\n                [3, 29]\n\t\t\t\t... // you can add as many segments as you want\n            ]\n        },\n\t\t\"content\" : { // the padding box configuration\n            \"x\" : [ // segments of the bottom edge of the NinePatch\n                [3, 43]\n\t\t\t\t... // you should provide only one segment here\n            ],\n            \"y\" : [ // segments of the right edge of the NinePatch\n                [3, 29]\n\t\t\t\t... // you should provide only one segment here\n            ]\n\t\t}\n    },\n    // ... other nine-patch config\n]\n```\nIf no segment is provided along an edge, the whole edge will be filled.  \n\nIf you have different SVG with the same name but with different qualifiers, you can provide a specific Nine-Patch configuration by using an array of qualifiers. A Nine-Patch configuration apply only to input SVG files which qualified name part match **ALL** of the Nine-Patch qualifiers.  \n  \nFor input SVG files that use a **constrained** density qualifier (adjusted Bounding Box), the **stretchable area** and the **padding box** segments **MUST NOT** be specified using the adjusted Bounding Box. They **MUST** use the regular Bounding Box of the input SVG file.\n\n### SVG Masking\n\nSVG Masking takes advantage of the SVG `\u003cimage\u003e` element and allow you to define generic layers, masks and filters as well as Nine-Patch configuration for the generated bitmaps. \n\n#### MASK file format\n\nSVGMASK files are particular SVG files named against the same rule as [input SVG files](#input-svg-files) except for the `.svgmask` extension. SVGMASK files **MUST** contain at least one *capturing* `\u003cimage\u003e` element with a `xlink:href` attribute which value matches against `#\\{(.*)\\}` and where the captured part of the attribute value is a valid [JAVA Pattern](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html) :   \n\n-   `\u003cimage x=\"0\" y=\"0\" width=\"10\" height=\"10\" xlink:href=\"#{btn_.*}\"/\u003e`\n-   `\u003cimage x=\"0\" y=\"0\" width=\"10\" height=\"10\" xlink:href=\"#{[a-z]{2}}\"/\u003e`\n\nSVGMASK files **MAY** contains more than one *capturing* `\u003cimage\u003e` element as well as standard SVG `\u003cimage\u003e` elements.  \n\n#### Generated masked files\n\nSVGMASK files are not directly converted into bitmaps. SVGMASK files are converted into temporary SVG files that are added to the list of [input SVG files](#input-svg-files) to convert. Those temporary SVG files are copies of the SVGMASK files DOM in which the `xlink:href` attribute value of each *capturing* `\u003cimage\u003e` is replaced by a `file:///` URI linking to an captured input SVG file.\n\nAn input SVG file is captured by a *capturing* `\u003cimage\u003e` element of a SVGMASK if it verifies the two following conditions :  \n\n1.  The unqualified name of the input SVG file match the capturing regexp of the *capturing* `\u003cimage\u003e` element\n2.  The qualified name of the input SVG file contains all of the qualifiers values defined in the SVGMASK qualified name (except for the density qualifier that is not taken into account)\n\nA carthesian product is made between each set of captured input SVG file for each *capturing* `\u003cimage\u003e` element of the SVGMASK file. A temporary SVG file is created for each `xlink:href` attribute combination in the resulting product set except for combinations that contains input SVG files with incompatible qualifiers. Incompatible SVG files are input SVG files that defines different values for a same configuration qualifier type.\n\nCombination that uses the same URI for two *capturing* `\u003cimage\u003e` elements can be skipped or not depending on the value of the `useSameSvgOnlyOnceInMask` parameter.\n\nFor each kept entry of the product set the generated temporary SVG file name is the concatenation of :\n\n1.  The SVGMASK unqualified name\n2.  The input SVG file unqualified name for each *capturing* `\u003cimage\u003e` element `xlink:href` URI\n\t-   in the order of the *capturing* `\u003cimage\u003e` element in the SVG file DOM\n3.  The union of the qualifier values for the SVGMASK and all of the linked input SVG files\n\t-   The density qualifier of the SVGMASK is used\n\t-   The SVGMASK bounding box is used as reference\n\t-   Linked input SVG files are scalled according to the `\u003cimage\u003e`element specifications\n\nResulting bitmaps are generated from those temporary SVG files following the same rules as for standard [Generated bitmaps](#generated-bitmaps). They can also produce Nine-Patch drawable as the Nine-Patch configuration file elements **MAY** reference temporary SVG files,see [Nine-Patch support](nine-patch-support).\n\n### Plugin options\n\n#### Options list\n\nThe plugin can be configured using the following options : \n\n| Name | Format | Description |  \n| :--- | :----- | :---------- |  \n|from|FileCollection|Collection of Path that contains the SVG files to generate drawable from. SVG files **MUST** be named against `\\w+(-{qualifier})+.svg` and **MUST** contain a valid density qualifier (ldpi, mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi, tvdpi). Could point to single files or to directories that will be scanned to find SVG files.|  \n|to|File|Path to the Android `res/` directory that contains the various `drawable/` directories.|  \n|createMissingDirectories|boolean|Set it to `false` if you don't want the plugin to create missing drawable(-{qualifier})*/ directories. The default value is set to `true`.|  \n|ninePatchConfig|File|Path to the 9-Patch JSON configuration file.|  \n|targetedDensities|List|List of the desired densities for the generated drawable. If not specified, a drawable is generate for each density qualifier that is supported by the android SDK.|  \n|outputFormat|`PNG` or `JPG`|The format of the generated bitmaps. Nine-Patch support apply only for the `PNG` output format.|  \n|outputType|`drawable` or `mipmap` or `raw`|The output directory for the generated bitmaps. Nine-Patch support apply only for the `drawable` output type. The `raw` output type will generate exactly one instance of each file found under `from` directory to the output directory specified by `to` (ignoring `targetDensities` if any and using the density qualifier from the input file name) |  \n|jpgQuality|Integer|The quality use for the JPG compression between 0 and 100 (higher is better). Default value is `85` (like Gimp).|  \n|jpgBackgroundColor|Integer|The background color used for the generated JPG bitmaps. Default is `0xFFFFFFFF` (opaque white).|  \n|svgMaskFiles|FileCollection|An optionnal collection of Path to pick the SVGMASK files from. Default to the same directory as the `from` parameter.|  \n|svgMaskResourceFiles|FileCollection|An optionnal collection of Path to pick the SVG files to mask from. Default to the same directory as the `svgMaskedSvgOutputDirectory` parameter.|  \n|useSameSvgOnlyOnceInMask|boolean|Tell the plugin to skip SVGMASK combinations that use the same SVG resource more than once. Default is `true`.|  \n\n#### Typical Gradle configuration\n\nCheck the [Gradle sample project](https://github.com/avianey/androidsvgdrawable-plugin/tree/master/sample/gradle) . \n\n#### Typical Maven configuration\n\nCheck the [Maven sample project](https://github.com/avianey/androidsvgdrawable-plugin/tree/master/sample/maven) . \n\n#### Typical LibGDX configuration\n\nCheck the [LibGDX sample project](https://github.com/avianey/androidsvgdrawable-plugin/tree/master/sample/libgdx) . \n\n## Best practices\n\n1.  Use a custom temporary output directory for every configuration\n    * see https://github.com/avianey/androidsvgdrawable-plugin/wiki/How-to-use-with-flavor  \n2.  `overwriteMode` **SHOULD** be forced to `always` for release build\n3.  Perform a `clean` when you upgrade `androidsvgdrawable-plugin`\n\n## Who's using it\n\n*  [Bubble Level](https://play.google.com/store/apps/details?id=net.androgames.level\u0026referrer=utm_source%3Dandroidsvgdrawable%26utm_medium%3Dusing%26utm_campaign%3Dusing)\n*  [Compass](https://play.google.com/store/apps/details?id=fr.avianey.compass\u0026referrer=utm_source%3Dandroidsvgdrawable%26utm_medium%3Dusing%26utm_campaign%3Dusing)\n*  [Yatzy (Dice Game)](https://play.google.com/store/apps/details?id=fr.pixelprose.dice\u0026referrer=utm_source%3Dandroidsvgdrawable%26utm_medium%3Dusing%26utm_campaign%3Dusing)\n*  [Yatzy](https://play.google.com/store/apps/details?id=net.androgames.yams\u0026referrer=utm_source%3Dandroidsvgdrawable%26utm_medium%3Dusing%26utm_campaign%3Dusing)\n*  [SudoKount⁵ (a sudoku like number puzzle game)](https://play.google.com/store/apps/details?id=com.sudokount.attack.five\u0026referrer=utm_source%3Dandroidsvgdrawable%26utm_medium%3Dusing%26utm_campaign%3Dusing)\n  \nPull Request to add yours !\n\n## License\n\n```\nCopyright 2013, 2014, 2015 Antoine Vianey  \n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at  \n\nhttp://www.apache.org/licenses/LICENSE-2.0  \n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favianey%2Fandroidsvgdrawable-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favianey%2Fandroidsvgdrawable-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favianey%2Fandroidsvgdrawable-plugin/lists"}