<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>io.spokestack</groupId>
   <artifactId>spokestack-android</artifactId>
   <version>11.4.2</version>
   <packaging>aar</packaging>
   <name>Spokestack Library for Android</name>
   <description>Core library of the Spokestack framework for Android</description>
   <url>https://github.com/spokestack/spokestack-android</url>
   <licenses>
      <license>
         <name>Apache License - v 2.0</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      </license>
   </licenses>
   <developers>
      <developer>
         <name>Brent M. Spell</name>
         <email>brent@spokestack.io</email>
         <organization>Spokestack</organization>
         <organizationUrl>http://spokestack.io/</organizationUrl>
      </developer>
      <developer>
         <name>Josh Ziegler</name>
         <email>josh@spokestack.io</email>
         <organization>Spokestack</organization>
         <organizationUrl>http://spokestack.io/</organizationUrl>
      </developer>
   </developers>
   <scm>
      <connection>scm:git:git://github.com/spokestack/spokestack-android.git</connection>
      <developerConnection>scm:git:git@github.com:spokestack/spokestack-android.git</developerConnection>
      <url>https://github.com/spokestack/spokestack-android</url>
      <tag>spokestack-android-11.4.2</tag>
   </scm>

   <prerequisites>
      <maven>3.2.1</maven>
   </prerequisites>

   <repositories>
      <repository>
         <id>google</id>
         <url>https://maven.google.com</url>
      </repository>
      <repository>
         <id>jcenter</id>
         <url>https://jcenter.bintray.com/</url>
      </repository>
      <repository>
         <id>microsoft</id>
         <url>https://csspeechstorage.blob.core.windows.net/maven/</url>
      </repository>
   </repositories>

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

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <maven.compiler.source>1.8</maven.compiler.source>
      <maven.compiler.target>1.8</maven.compiler.target>
      <powermock.version>2.0.2</powermock.version>
   </properties>

   <dependencies>
      <!-- android platform -->
      <dependency>
         <groupId>com.google.android</groupId>
         <artifactId>android</artifactId>
         <version>4.1.1.4</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>androidx.media</groupId>
         <artifactId>media</artifactId>
         <version>1.1.0</version>
         <type>aar</type>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>com.google.android.exoplayer</groupId>
         <artifactId>exoplayer-core</artifactId>
         <version>2.11.0</version>
         <type>aar</type>
         <scope>provided</scope>
      </dependency>

      <!-- google speech api -->
      <dependency>
         <groupId>com.google.cloud</groupId>
         <artifactId>google-cloud-speech</artifactId>
         <version>0.61.0-beta</version>
         <scope>provided</scope>
      </dependency>

      <!-- azure speech service  -->
      <dependency>
         <groupId>com.microsoft.cognitiveservices.speech</groupId>
         <artifactId>client-sdk</artifactId>
         <version>1.9.0</version>
         <type>aar</type>
         <scope>provided</scope>
      </dependency>

      <!-- spokestack TTS -->
      <dependency>
         <groupId>com.squareup.okhttp3</groupId>
         <artifactId>okhttp</artifactId>
         <version>4.9.1</version>
      </dependency>
      <dependency>
         <groupId>com.google.code.gson</groupId>
         <artifactId>gson</artifactId>
         <version>2.8.5</version>
      </dependency>

      <!-- fft and tensorflow -->
      <dependency>
         <groupId>com.github.wendykierp</groupId>
         <artifactId>JTransforms</artifactId>
         <version>3.0</version>
      </dependency>
      <dependency>
         <groupId>org.tensorflow</groupId>
         <artifactId>tensorflow-lite</artifactId>
         <version>1.12.0</version>
         <type>aar</type>
         <scope>provided</scope>
      </dependency>

      <!-- testing -->
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>4.13.1</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter-api</artifactId>
         <version>5.3.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <version>2.23.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.powermock</groupId>
         <artifactId>powermock-module-junit4</artifactId>
         <version>${powermock.version}</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.powermock</groupId>
         <artifactId>powermock-api-mockito2</artifactId>
         <version>${powermock.version}</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <!-- build -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>
            <configuration>
               <compilerArgs>
                  <arg>-Xlint:all</arg>
               </compilerArgs>
            </configuration>
         </plugin>
         <plugin>
            <groupId>com.simpligility.maven.plugins</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>4.6.0</version>
            <extensions>true</extensions>
            <configuration>
               <consumerProguardFiles>
                  <consumerProguardFile>src/main/proguard.txt</consumerProguardFile>
               </consumerProguardFiles>
               <sdk>
                  <platform>26</platform>
               </sdk>
            </configuration>
         </plugin>
         <plugin>
            <groupId>com.simpligility.maven.plugins</groupId>
            <artifactId>android-ndk-maven-plugin</artifactId>
            <version>1.1.2</version>
            <configuration>
               <ndkPath>${android.ndk.path}</ndkPath>
               <useHeaderArchives>false</useHeaderArchives>
            </configuration>
            <executions>
               <execution>
                  <id>build-native-library</id>
                  <phase>compile</phase>
                  <goals>
                     <goal>ndk-build</goal>
                  </goals>
               </execution>
               <execution>
                  <id>package-native-library</id>
                  <phase>package</phase>
                  <goals>
                     <goal>ndk-build</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

         <!-- submodules -->
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.6.0</version>
            <inherited>false</inherited>
            <executions>
               <execution>
                  <id>git submodule update</id>
                  <phase>initialize</phase>
                  <configuration>
                     <executable>git</executable>
                     <arguments>
                        <argument>submodule</argument>
                        <argument>update</argument>
                        <argument>--init</argument>
                        <argument>--recursive</argument>
                     </arguments>
                  </configuration>
                  <goals>
                     <goal>exec</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

         <!-- testing -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.0</version>
            <configuration>
               <useSystemClassLoader>false</useSystemClassLoader>
               <argLine>${argLine} -Djava.library.path=./target -XX:-OmitStackTraceInFastThrow</argLine>
               <trimStackTrace>false</trimStackTrace>
            </configuration>
         </plugin>

         <!-- coverage -->
         <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.2</version>
            <executions>
               <execution>
                  <id>prepare-agent</id>
                  <goals>
                     <goal>prepare-agent</goal>
                  </goals>
               </execution>
               <execution>
                  <id>jacoco-check</id>
                  <goals>
                     <goal>check</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <excludes>
                  <exclude>**/io/spokestack/spokestack/BuildConfig.*</exclude>
               </excludes>
               <dataFile>./target/jacoco.exec</dataFile>
               <rules>
                 <rule>
                   <element>BUNDLE</element>
                   <limits>
                     <limit>
                       <counter>INSTRUCTION</counter>
                       <value>COVEREDRATIO</value>
                       <minimum>0.85</minimum>
                     </limit>
                   </limits>
                 </rule>
               </rules>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
            <version>4.3.0</version>
         </plugin>

         <!-- lint -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
               <configLocation>src/main/resources/checkstyle.xml</configLocation>
            </configuration>
         </plugin>

         <!-- docs -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.0</version>
            <executions>
               <execution>
                  <id>attach-javadocs</id>
                  <goals>
                     <goal>jar</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

         <!-- deployment -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
               <execution>
                  <id>attach-sources</id>
                  <goals>
                     <goal>jar-no-fork</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
               <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                     <goal>sign</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
           <groupId>org.sonatype.plugins</groupId>
           <artifactId>nexus-staging-maven-plugin</artifactId>
           <version>1.6.8</version>
           <extensions>true</extensions>
           <configuration>
             <serverId>ossrh</serverId>
             <nexusUrl>https://oss.sonatype.org/</nexusUrl>
             <autoReleaseAfterClose>true</autoReleaseAfterClose>
           </configuration>
         </plugin>
      </plugins>
   </build>
</project>
