<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<artifactId>application</artifactId>
	<name>HoloEverywhere Application</name>
	<packaging>pom</packaging>

	<parent>
		<groupId>org.holoeverywhere</groupId>
		<artifactId>parent</artifactId>
		<version>1.6.8</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.holoeverywhere</groupId>
				<artifactId>addon-slider</artifactId>
				<version>1.6.8</version>
				<type>apklib</type>
			</dependency>

			<dependency>
				<groupId>org.holoeverywhere</groupId>
				<artifactId>addon-preferences</artifactId>
				<version>1.6.8</version>
				<type>apklib</type>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>com.google.android</groupId>
			<artifactId>android</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.google.android</groupId>
			<artifactId>android-test</artifactId>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.holoeverywhere</groupId>
			<artifactId>library</artifactId>
			<version>1.6.8</version>
			<type>apklib</type>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>com.jayway.maven.plugins.android.generation2</groupId>
				<artifactId>android-maven-plugin</artifactId>
				<extensions>true</extensions>

				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>zipalign</goal>
						</goals>
					</execution>
				</executions>

				<configuration>
					<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>

					<test>
						<skip>true</skip>
					</test>

					<file>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</file>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>com.jayway.maven.plugins.android.generation2</groupId>
							<artifactId>android-maven-plugin</artifactId>
							<configuration>
								<apkDebug>false</apkDebug>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>

		<profile>
			<id>sign</id>
			<activation>
				<file>
					<exists>${holo.sign.keystore}</exists>
				</file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jarsigner-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>attach-apk</id>
			<activation>
				<file>
					<exists>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</exists>
				</file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<version>1.7</version>

						<configuration>
							<artifacts>
								<artifact>
									<file>${project.build.directory}/${project.artifactId}-${project.version}-signed-aligned.apk</file>
									<type>apk</type>
									<classifier>signed-aligned</classifier>
								</artifact>
							</artifacts>
						</configuration>

						<executions>
							<execution>
								<id>attach-apk</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>resbuilder</id>
			<activation>
				<file>
					<exists>${project.basedir}/resbuilder</exists>
				</file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.holoeverywhere</groupId>
						<artifactId>resbuilder</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
