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

    <groupId>net.wesjd</groupId>
    <artifactId>anvilgui-parent</artifactId>
    <version>1.10.12-SNAPSHOT</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <modules>
        <module>api</module>
        <module>abstraction</module>
        <module>1_7_R4</module>
        <module>1_8_R1</module>
        <module>1_8_R2</module>
        <module>1_8_R3</module>
        <module>1_9_R1</module>
        <module>1_9_R2</module>
        <module>1_10_R1</module>
        <module>1_11_R1</module>
        <module>1_12_R1</module>
        <module>1_13_R1</module>
        <module>1_13_R2</module>
        <module>1_14_R1</module>
        <module>1_14_4_R1</module>
        <module>1_15_R1</module>
        <module>1_16_R1</module>
        <module>1_16_R2</module>
        <module>1_16_R3</module>
        <module>1_17_R1</module>
        <module>1_17_1_R1</module>
        <module>1_18_R1</module>
        <module>1_18_R2</module>
        <module>1_19_R1</module>
        <module>1_19_1_R1</module>
        <module>1_19_R2</module>
        <module>1_19_R3</module>
        <module>1_20_R1</module>
        <module>1_20_R2</module>
        <module>1_20_R3</module>
        <module>1_20_R4</module>
        <module>1_21_R1</module>
        <module>1_21_R2</module>
        <module>1_21_R3</module>
        <module>1_21_R4</module>
        <module>1_21_R5</module>
        <module>1_21_R6</module>
        <module>1_21_R7</module>
        <module>26_R1</module>
    </modules>

    <repositories>
        <repository>
            <id>nms-repo</id>
            <url>https://repo.codemc.org/repository/nms/</url>
        </repository>
        <repository>
            <id>opencollab-snapshot</id>
            <url>https://repo.opencollab.dev/main/</url>
        </repository>
    </repositories>

    <build>
        <!-- Considering this project is purely used as a library, it makes sense for the default goal
         to install -->
        <defaultGoal>clean install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>3.4.0</version>
                <inherited>false</inherited> <!-- Only need to run once for the whole project -->
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
                <configuration>
                    <java>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                        <palantirJavaFormat/>
                        <removeUnusedImports/>
                        <importOrder/>
                    </java>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.4</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
