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

  <parent>
    <groupId>org.drools</groupId>
    <artifactId>drools-examples-android</artifactId>
    <version>7.18.0.Final</version>
  </parent>

  <artifactId>kiecontainer</artifactId>
  <packaging>apk</packaging>

  <name>Drools Android Examples :: KieContainer</name>

  <dependencies>
    <dependency>
      <groupId>com.google.android</groupId>
      <artifactId>android</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-android</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-compiler</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xmlpull</groupId>
          <artifactId>xmlpull</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xpp3</groupId>
          <artifactId>xpp3_min</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-internal</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.tony19</groupId>
      <artifactId>logback-android-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.tony19</groupId>
      <artifactId>logback-android-classic</artifactId>
      <exclusions>
        <exclusion>
          <groupId>com.google.android</groupId>
          <artifactId>android</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>multidex</artifactId>
      <type>aar</type>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.kie</groupId>
        <artifactId>kie-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>compile-kbase</id>
            <goals>
              <goal>build</goal>
            </goals>
            <phase>compile</phase>
            <configuration>
              <systemProperties>
                <property>
                  <name>drools.dialect.java.compiler.lnglevel</name>
                  <value>1.6</value>
                </property>
              </systemProperties>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.simpligility.maven.plugins</groupId>
        <artifactId>android-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <sdk>
            <platform>21</platform>
          </sdk>
          <manifest>
            <versionName/>
            <versionCodeUpdateFromVersion>true</versionCodeUpdateFromVersion>
            <debuggable>true</debuggable>
          </manifest>
          <dex>
            <coreLibrary>true</coreLibrary>
            <jvmArguments>
              <jvmArgument>-Xmx2048m</jvmArgument>
            </jvmArguments>
            <multiDex>true</multiDex>
            <mainDexList>maindex.txt</mainDexList>
          </dex>
          <extractDuplicates>true</extractDuplicates>
          <apk>
            <metaInf>
              <includes>
                <include>services/**</include>
                <include>kmodule.*</include>
                <include>HelloKB/**</include>
                <include>drools**</include>
                <include>maven/${project.groupId}/${project.artifactId}/**</include>
              </includes>
            </metaInf>
          </apk>
        </configuration>
        <executions>
          <execution>
            <id>manifest</id>
            <phase>process-resources</phase>
            <goals>
              <goal>manifest-update</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

