<?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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.github.4rg0n</groupId>
        <artifactId>songs-of-syx-mod-parent</artifactId>
        <version>local</version>
    </parent>

    <name>Songs of Syx Mod SDK</name>
    <description>Provides a framework for developing code mods in the game Songs of Syx.</description>
    <url>https://github.com/4rg0n/songs-of-syx-mod-more-options/tree/main/mod-sdk/src/main/java/com/github/argon/sos/mod/sdk#readme</url>
    <groupId>io.github.4rg0n</groupId> <!-- Required for publishing to Maven Central -->
    <artifactId>sos-mod-sdk</artifactId>
    <version>0.1.3</version>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <profiles>
        <profile>
            <id>maven-central</id>
            <build>
                <plugins>
                    <!-- Generate Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.12.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <!-- ignore vanilla game classes -->
                            <excludePackageNames>game.*:settlement.*:snake2d:snake2d.*:init.*:menu.*:util.*:view.*:world.*</excludePackageNames>
                        </configuration>
                    </plugin>

                    <!-- Sign artifacts with GPG for publishing to Maven Central -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keyname>Dominic R├Ânicke</keyname>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <developers>
        <developer>
            <name>Dominic Rönicke</name>
            <email>argonthechecker@gmail.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/4rg0n/songs-of-syx-mod-more-options.git</connection>
        <developerConnection>scm:git:ssh://github.com/4rg0n/songs-of-syx-mod-more-options.git</developerConnection>
        <url>https://github.com/4rg0n/songs-of-syx-mod-more-options/tree/main</url>
    </scm>

    <properties>
        <mod.version>${project.version}</mod.version>
        <mod.name>Mod SDK V0</mod.name>
        <mod.description>Provides tools for code modding.</mod.description>
        <mod.author>4rg0n</mod.author>
        <mod.info></mod.info>
    </properties>

    <dependencies>
        <!-- Lazy Developer -->
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>${jetbrains.annotations.version}</version>
        </dependency>

        <!-- Data -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-properties</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>io.github.4rg0n</groupId>
            <artifactId>sos-mod-test</artifactId>
            <version>0.1.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- Build a fat / uber jar containing all dependencies -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <!-- Copy game resources for testing -->
                    <execution>
                        <id>copy-game-resources</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/base</outputDirectory>
                            <includeEmptyDirs>true</includeEmptyDirs>
                            <overwrite>true</overwrite>
                            <resources>
                                <resource>
                                    <directory>${game.install.directory}/base</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Remove "installed" mod resources on clean -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
            </plugin>

            <!-- Attach mod source code -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

            <!-- Publishing to Maven Central -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.9.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>