<!--
    Copyright 2015, 2017 Francesco Benincasa (info@abubusoft.com).
   
    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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<name>Kripton Android Library</name>

	<groupId>com.abubusoft</groupId>
	<artifactId>kripton-android-library</artifactId>
	<version>2.0.0</version>
	<packaging>jar</packaging>

	<description>Kripton Persistence Library for Android platform</description>
	
	<url>https://github.com/xcesco/kripton</url>

	<!-- common part - BEGIN -->
	<!-- Property version 1.6.2-SNAPSHOT -->
	<properties>
		<!-- environment version -->
		<sourceEncoding>UTF-8</sourceEncoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		
		<java.version>1.7</java.version>

		<!-- dependencies version -->
		<jackson.version>2.8.9</jackson.version>
		<retrofit.version>2.1.0</retrofit.version>
		
		<kripton.debug>false</kripton.debug>

		<!-- test version -->
		<junit.version>4.12</junit.version>
		<unitils.version>3.4.2</unitils.version>

		<jsr305.version>3.0.1</jsr305.version>
		<guava.version>19.0</guava.version>
		<javapoet.version>1.7.0</javapoet.version>
		<robolectric.version>3.1.4</robolectric.version>

		<!-- plugins version -->
		<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>
		<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
		<maven-source-plugin.version>3.0.1</maven-source-plugin.version>

		<!-- kripton debug mode -->
		<kripton.debug>false</kripton.debug>
	</properties>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/xcesco/kripton/issues</url>
	</issueManagement>

	<scm>
		<connection>scm:git:https://github.com/xcesco/kripton.git</connection>
		<developerConnection>scm:git:git@github.com:xcesco/kripton.git</developerConnection>
		<url>https://github.com/xcesco/kripton</url>
	</scm>

	<developers>
		<developer>
			<id>xcesco</id>
			<name>Francesco Benincasa</name>
			<email>abubusoft@gmail.com</email>
			<roles>
				<role>owner</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<profiles>
		<profile>
			<id>deploy</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- deploy on sonatype -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging-maven-plugin.version}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>

			<!-- distribution manager -->
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				<repository>
					<id>ossrh</id>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>

		</profile>

		<profile>
			<id>release</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven-javadoc-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<!-- <additionalparam>-Xdoclint:none</additionalparam> -->
									<!-- <excludePackageNames>com.abubusoft.kripton.android*</excludePackageNames> -->
									<failOnError>false</failOnError>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven-source-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>
	</profiles>

	<!-- common part - END -->
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.20</version>
				<configuration>
					<systemPropertyVariables>
						<kripton.debug>${kripton.debug}</kripton.debug>
					</systemPropertyVariables>
					<includes>
						<include>all/*TestSuite.java</include>
					</includes>

				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>com.abubusoft</groupId>
			<artifactId>kripton</artifactId>
			<version>${project.version}</version>
		</dependency>

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

		<dependency>
			<groupId>org.robolectric</groupId>
			<artifactId>android-all</artifactId>
			<version>5.0.0_r2-robolectric-0</version>
			<scope>provided</scope>
		</dependency>

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

		<dependency>
			<groupId>com.google.android</groupId>
			<artifactId>support-v4</artifactId>
			<version>r7</version>
			<scope>provided</scope>
		</dependency>

		<!-- TEST DEPENDENCIES -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.unitils</groupId>
			<artifactId>unitils-core</artifactId>
			<version>${unitils.version}</version>
			<exclusions>
				<exclusion>
					<artifactId>junit</artifactId>
					<groupId>junit</groupId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.5</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

</project>