<?xml version="1.0"?>
<!--
  JBoss, Home of Professional Open Source
  Copyright Red Hat, Inc., and individual contributors

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<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>

    <groupId>org.jboss.aerogear</groupId>
    <artifactId>aerogear-android-sync</artifactId>
    <version>2.1.0</version>
    <packaging>aar</packaging>
    <name>AeroGear Data Synchronization Android Client Library</name>

    <parent>
        <groupId>org.jboss.aerogear</groupId>
        <artifactId>aerogear-parent</artifactId>
        <version>0.2.11</version>
    </parent>

    <scm>
        <connection>scm:git:git@github.com:aerogear/aerogear-android-sync.git</connection>
        <developerConnection>scm:git:git@github.com:aerogear/aerogear-android-sync.git</developerConnection>
        <url>git@github.com:aerogear/aerogear-android-sync.git</url>
        <tag>2.1.0</tag>
    </scm>

    <properties>
        <java.version>1.6</java.version>
        <maven.compiler.target>1.6</maven.compiler.target>
        <maven.compiler.source>1.6</maven.compiler.source>

        <!-- Project depencies versions -->
        <android.version>[5.0_r1,)</android.version>
        <aerogear.android.sync.version>0.0.1-SNAPSHOT</aerogear.android.sync.version>

        <!-- Plugins versions -->
        <maven.javadoc.plugin.version>2.9.1</maven.javadoc.plugin.version>
        <maven.android.plugin.version>4.1.1</maven.android.plugin.version>
        <builder.helper.plugin.version>1.7</builder.helper.plugin.version>
        <maven.compiler.plugin.version>2.3.2</maven.compiler.plugin.version>

        <!-- Android configs -->
        <android.platform>19</android.platform>
        <android.debug>false</android.debug>
        <proguard.skip>true</proguard.skip>
    </properties>


    <dependencies>

        <dependency>
            <groupId>android</groupId>
            <artifactId>android</artifactId>
            <scope>provided</scope>
            <version>${android.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.aerogear</groupId>
            <artifactId>sync-json-patch-core</artifactId>
            <version>1.0.0-alpha.1</version>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.jboss.aerogear</groupId>
            <artifactId>sync-json-patch-client</artifactId>
            <version>1.0.0-alpha.1</version>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>org.jboss.aerogear</groupId>
            <artifactId>sync-client-netty</artifactId>
            <version>1.0.0-alpha.1</version>
            <type>jar</type>
        </dependency>

    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.simpligility.maven.plugins</groupId>
                    <artifactId>android-maven-plugin</artifactId>
                    <version>${maven.android.plugin.version}</version>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourcepath>${basedir}/src</sourcepath>
                    <sourceFileExcludes>
                        <exclude>
                            **com/google/**
                        </exclude>
                        <exclude>**/R.java</exclude>
                    </sourceFileExcludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.simpligility.maven.plugins</groupId>
                <artifactId>android-maven-plugin</artifactId>
                <configuration>
                    <run>
                        <debug>${android.debug}</debug>
                    </run>
                    <sdk>
                        <platform>${android.platform}</platform>
                    </sdk>
                    <emulator>
                        <avd>${android.platform}</avd>
                    </emulator>
                    <undeployBeforeDeploy>true</undeployBeforeDeploy>
                    <proguard>
                        <skip>${proguard.skip}</skip>
                    </proguard>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${builder.helper.plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <type>jar</type>
                                    <file>${project.build.directory}/${project.build.finalName}.jar</file>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

</project>

