summaryrefslogtreecommitdiff
path: root/pom.xml
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2013-01-10 16:22:00 +0100
committerdaniel oeh <daniel.oeh@gmail.com>2013-01-10 16:22:00 +0100
commit93be98c0ebb089d794879f9c3d01b6bd46440270 (patch)
tree834b0e46021082ec18626b0f3e332daed7d1b745 /pom.xml
parent174d07effa6d3170468fa14b813afa65892fc4ee (diff)
downloadAntennaPod-93be98c0ebb089d794879f9c3d01b6bd46440270.zip
Added jarsigner plugin to pom
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml162
1 files changed, 157 insertions, 5 deletions
diff --git a/pom.xml b/pom.xml
index 99b0fde55..6d55ea9bd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,10 +59,10 @@
<version>4.1.1.4</version>
</dependency>
<dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.4</version>
- </dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
</dependencies>
@@ -81,17 +81,169 @@
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
- <version>3.3.0</version>
+ <version>3.5.0</version>
<configuration>
<sdk>
<path>${env.ANDROID_HOME}</path>
<platform>17</platform>
</sdk>
+ <manifest>
+ <debuggable>true</debuggable>
+ </manifest>
</configuration>
<extensions>true</extensions>
+ <executions>
+ <execution>
+ <id>manifestUpdate</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>manifest-update</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>alignApk</id>
+ <phase>package</phase>
+ <goals>
+ <goal>zipalign</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>development</id>
+ <!-- using this since activeByDefault does not work well with multiple
+ profiles -->
+ <activation>
+ <property>
+ <name>environment</name>
+ <value>!production</value>
+ </property>
+ </activation>
+ <properties>
+ <deployment.stage>In Development</deployment.stage>
+ </properties>
+ </profile>
+ <profile>
+ <id>production</id>
+ <properties>
+ <deployment.stage>In Production</deployment.stage>
+ </properties>
+ </profile>
+ <profile>
+ <id>release</id>
+ <!-- via this activation the profile is automatically used when the release
+ is done with the maven release plugin -->
+ <activation>
+ <property>
+ <name>performRelease</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jarsigner-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>signing</id>
+ <goals>
+ <goal>sign</goal>
+ <goal>verify</goal>
+ </goals>
+ <phase>package</phase>
+ <inherited>true</inherited>
+ <configuration>
+ <removeExistingSignatures>true</removeExistingSignatures>
+ <archiveDirectory />
+ <includes>
+ <include>${project.build.directory}/${project.artifactId}-${project.version}.apk</include>
+ </includes>
+ <keystore>${sign.keystore}</keystore>
+ <alias>${sign.alias}</alias>
+ <storepass>${sign.storepass}</storepass>
+ <keypass>${sign.keypass}</keypass>
+ <verbose>true</verbose>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- the signed apk then needs to be zipaligned and we activate proguard
+ and we run the manifest update -->
+ <plugin>
+ <groupId>com.jayway.maven.plugins.android.generation2</groupId>
+ <artifactId>android-maven-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <sign>
+ <debug>false</debug>
+ </sign>
+ <zipalign>
+ <skip>false</skip>
+ <verbose>true</verbose>
+ <inputApk>${project.build.directory}/${project.artifactId}-${project.version}.apk</inputApk>
+ <outputApk>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk
+ </outputApk>
+ </zipalign>
+ <manifest>
+ <debuggable>false</debuggable>
+ <versionCodeAutoIncrement>true</versionCodeAutoIncrement>
+ </manifest>
+ <proguard>
+ <skip>true</skip>
+ </proguard>
+ </configuration>
+ <executions>
+ <execution>
+ <id>manifestUpdate</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>manifest-update</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>alignApk</id>
+ <phase>package</phase>
+ <goals>
+ <goal>zipalign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</file>
+ <type>apk</type>
+ <classifier>signed-aligned</classifier>
+ </artifact>
+ <artifact>
+ <file>${project.build.directory}/proguard/mapping.txt</file>
+ <type>map</type>
+ <classifier>release</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-signed-aligned</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>