<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>com.magmaguy</groupId>
        <artifactId>ResourcePackManager-parent</artifactId>
        <version>2.3.1</version>
    </parent>

    <artifactId>resourcepackmanager-geyser-bridge</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.geysermc.geyser</groupId>
            <artifactId>api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.geysermc.geyser</groupId>
            <artifactId>core</artifactId>
            <version>${geyser.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.magmaguy</groupId>
            <artifactId>resourcepackmanager-bridge-common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
    </dependencies>

    <build>
        <!-- Internal build adapter only. It is shaded into the one public
             ResourcePackManager.jar and is never copied or distributed alone. -->
        <finalName>resourcepackmanager-geyser-adapter-internal</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <relocations>
                                <relocation>
                                    <pattern>com.magmaguy.resourcepackmanager.bridge</pattern>
                                    <shadedPattern>com.magmaguy.resourcepackmanager.geyserbridge.libs.bridge</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.google.gson</pattern>
                                    <shadedPattern>com.magmaguy.resourcepackmanager.geyserbridge.libs.gson</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
