<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>
	<groupId>ch.acra</groupId>
	<artifactId>acra</artifactId>
	<packaging>aar</packaging>
	<version>4.9.2</version>

	<name>Application Crash Report for Android</name>

	<description>
        Publishes a report of an Android application crash to Google docs (or some other end point).
    </description>

	<url>http://acra.ch</url>
	<inceptionYear>2010</inceptionYear>

	<licenses>
		<license>
			<name>Apache 2</name>
			<distribution>repo</distribution>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<comments>Go for it.</comments>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>kevin.gaudin</id>
			<name>Kevin Gaudin</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>william.ferguson</id>
			<name>William Ferguson</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!--
			NB ACRA supports back to API 8.

			But in order to compile classes and method that will NOT be used except when the target platform is of sufficient version
			we need to compile against version 23. All such classes are in the org.acra.jraf package.
		-->
        <android.version>23</android.version>
		<support.version>24.1.1</support.version>
	</properties>

	<dependencies>
        <!--
            To get this library to compile (with appropriate warnings) in your IDE, you need to point your IDE project SDK
            to your Android SDK and choose an Android version. This library has been designed to run in Android-3 and newer versions.

            To get this library to compile in Maven you need to have an Android SDK installed and pointed to
            by an ANDROID_HOME environment variable. This is because we use a bootclasspath during compilation
            to ensure that only APIs from a specific Android version have been used.
            NB The AndroidAPI dependency is included below to allow test execution and javadoc generation.
        -->
        <dependency>
            <groupId>android</groupId> <!-- deployed using the android-maven-sdk-deployer -->
            <artifactId>android</artifactId>
            <version>6.0_r1</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
		<dependency>
			<groupId>com.android.support</groupId>
			<artifactId>support-v4</artifactId>
			<version>${support.version}</version>
			<type>aar</type>
		</dependency>

		<dependency>
			<groupId>com.android.support</groupId>
			<artifactId>support-annotations</artifactId>
			<version>${support.version}</version>
			<type>jar</type>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<type>jar</type>
			<scope>test</scope>
		</dependency>
    </dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>2.3.2</version>
				</plugin>
				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>2.2.1</version>
				</plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.10.3</version>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<version>2.1.2</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>com.simpligility.maven.plugins</groupId>
				<artifactId>android-maven-plugin</artifactId>
				<version>4.4.3</version>
				<extensions>true</extensions>
				<configuration>

					<sdk>
						<platform>${android.version}</platform>
					</sdk>

					<consumerProguardFiles>
						<consumerProguardFile>src/main/proguard/proguard.cfg</consumerProguardFile>
					</consumerProguardFiles>

					<buildConfigConstants>
						<buildConfigConstant>
							<name>VERSION_NAME</name>
							<type>String</type>
							<value>${project.version}</value>
						</buildConfigConstant>
					</buildConfigConstants>

				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<showWarnings>true</showWarnings>
                    <compilerArguments>
                        <bootclasspath>${env.ANDROID_HOME}/platforms/android-${android.version}/android.jar</bootclasspath>
                    </compilerArguments>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
                <configuration>
					<bootclasspath>${env.JAVA_HOME}/jre/lib/rt.jar;${env.ANDROID_HOME}/platforms/android-${android.version}/android.jar</bootclasspath>
                    <excludePackageNames>org.acra.log,org.acra.util</excludePackageNames>
                </configuration>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>src/main/assembly/distribution.xml</descriptor>
					</descriptors>
					<finalName>${project.build.finalName}</finalName>
					<appendAssemblyId>false</appendAssemblyId>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<extensions>
			<extension>
				<groupId>org.jvnet.wagon-svn</groupId>
				<artifactId>wagon-svn</artifactId>
				<version>1.9</version>
			</extension>
		</extensions>
	</build>

	<scm>
		<connection>scm:git:git@github.com:ACRA/acra.git</connection>
		<developerConnection>scm:git:git@github.com:ACRA/acra.git</developerConnection>
		<url>ssh://git@github.com:ACRA/acra.git</url>
	</scm>
    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                    <goals>
                                        <goal>sign</goal>
                                    </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
