Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
pom configuration to generate android app pics in each resolution
<plugin>
<groupId>net.trajano.mojo</groupId>
<artifactId>batik-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>ldpi</id>
<goals><goal>rasterizer</goal></goals>
<phase>initialize</phase>
<configuration>
<destDir>${basedir}/res/drawable-ldpi</destDir>
<mimeType>image/png</mimeType>
<svgResources>
<resources>
<directory>${basedir}/svg</directory>
<filtering>false</filtering>
<includes>
<include>**\/\*.svg</include>
</includes>
<excludes>
</excludes>
</resources>
</svgResources>
<maxHeight>32</maxHeight>
<maxHeight>32</maxHeight>
</configuration>
</execution>
<execution>
<id>mdpi</id>
<goals><goal>rasterizer</goal></goals>
<phase>initialize</phase>
<configuration>
<destDir>${basedir}/res/drawable-mdpi</destDir>
<mimeType>image/png</mimeType>
<svgResources>
<resources>
<directory>${basedir}/svg</directory>
<filtering>false</filtering>
<includes>
<include>**\/\*.svg</include>
</includes>
<excludes>
</excludes>
</resources>
</svgResources>
<maxHeight>64</maxHeight>
<maxHeight>64</maxHeight>
</configuration>
</execution>
<execution>
<id>hdpi</id>
<goals><goal>rasterizer</goal></goals>
<phase>initialize</phase>
<configuration>
<destDir>${basedir}/res/drawable-hdpi</destDir>
<mimeType>image/png</mimeType>
<svgResources>
<resources>
<directory>${basedir}/svg</directory>
<filtering>false</filtering>
<includes>
<include>**\/\*.svg</include>
</includes>
<excludes>
</excludes>
</resources>
</svgResources>
<maxHeight>128</maxHeight>
<maxHeight>128</maxHeight>
</configuration>
</execution>
<execution>
<id>xhdpi</id>
<goals><goal>rasterizer</goal></goals>
<phase>initialize</phase>
<configuration>
<destDir>${basedir}/res/drawable-xhdpi</destDir>
<mimeType>image/png</mimeType>
<svgResources>
<resources>
<directory>${basedir}/svg</directory>
<filtering>false</filtering>
<includes>
<include>**\/\*.svg</include>
</includes>
<excludes>
</excludes>
</resources>
</svgResources>
<maxHeight>256</maxHeight>
<maxHeight>256</maxHeight>
</configuration>
</execution>
<execution>
<id>xxhdpi</id>
<goals><goal>rasterizer</goal></goals>
<phase>initialize</phase>
<configuration>
<destDir>${basedir}/res/drawable-xxhdpi</destDir>
<mimeType>image/png</mimeType>
<svgResources>
<resources>
<directory>${basedir}/svg</directory>
<filtering>false</filtering>
<includes>
<include>**\/\*.svg</include>
</includes>
<excludes>
</excludes>
</resources>
</svgResources>
<maxHeight>512</maxHeight>
<maxHeight>512</maxHeight>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment