<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.geolykt.starloader</groupId>
    <artifactId>reversible-access-setter</artifactId>
    <version>1.0.0</version>
    <name>Reversible Access Setter</name>
    <description>Various classes for interfacing with reversible access setter files</description>
    <inceptionYear>2023</inceptionYear>
    <url>https://github.com/Starloader-project/Reversible-access-setter</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gpg.skip>true</gpg.skip>
    </properties>

    <repositories>
        <repository>
            <id>fabricmc</id>
            <url>https://maven.fabricmc.net/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>24.0.1</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-tree</artifactId>
            <version>9.5</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.7</version>
            <scope>provided</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.fabricmc/tiny-remapper -->
        <dependency>
            <groupId>net.fabricmc</groupId>
            <artifactId>tiny-remapper</artifactId>
            <version>0.8.6</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <licenses>
        <license>
            <name>BSD-3-Clause</name>
            <url>https://opensource.org/license/bsd-3-clause/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>geolykt</id>
            <email>mail@geolykt.de</email>
            <name>Geolykt</name>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/starloader-project/reversible-access-setter.git</connection>
        <developerConnection>scm:git:ssh://github.com:starloader-project/reversible-access-setter.git</developerConnection>
        <url>http://github.com/starloader-project/reversible-access-setter/tree/main</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <defaultGoal>clean package</defaultGoal>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>.</directory>
                <includes>
                    <include>RAS-LICENSE.md</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <archive>
                        <index>true</index>
                        <manifestEntries>
                            <Multi-Release>true</Multi-Release>
                            <Built-By>${env.USERNAME}</Built-By>
                        </manifestEntries>
                        <addMavenDescriptor>true</addMavenDescriptor>
                        <compress>true</compress>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <release>8</release>
                </configuration>
                <executions>
                    <execution>
                        <id>compile-java-8</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <source>1.8</source>
                            <target>1.8</target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>compile-java-11</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <release>11</release>
                            <compileSourceRoots>
                                <compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
                            </compileSourceRoots>
                            <multiReleaseOutput>true</multiReleaseOutput>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <keyname>${gpg.keyname}</keyname>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
