<?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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>fxgl-framework</artifactId>
        <groupId>com.github.almasb</groupId>
        <version>17</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>fxgl-entity</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.github.almasb</groupId>
            <artifactId>fxgl-core</artifactId>
            <version>${fxgl.version}</version>
        </dependency>

        <dependency>
            <groupId>com.github.almasb</groupId>
            <artifactId>fxgl-test</artifactId>
            <version>${fxgl.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Compile java -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <!-- Compile kotlin -->
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
            </plugin>

            <!-- Create sources.jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

            <!-- Create javadoc.jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>

            <!-- Attach kotlin sources -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>

            <!-- Generate test coverage reports -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <configuration>
                    <destFile>${project.build.directory}/coverage-reports/jacoco-unit.exec</destFile>
                    <dataFile>${project.build.directory}/coverage-reports/jacoco-unit.exec</dataFile>

                    <!-- Ignore 3rd party code -->

                    <excludes>
                        <exclude>com/almasb/fxgl/physics/box2d/**/*</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>