<?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>io.github.neodix42</groupId>
    <artifactId>top</artifactId>
    <packaging>pom</packaging>
    <version>0.1.5</version>

    <modules>
        <module>bitstring</module>
        <module>utils</module>
        <module>address</module>
        <module>cell</module>
        <module>smartcontract</module>
        <module>tonlib</module>
        <module>mnemonic</module>
        <!-- <module>tlb</module> -->
    </modules>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <junit.version>4.13.2</junit.version>
        <commons.version>1.15</commons.version>
        <tweetnacl.version>1.1.2</tweetnacl.version>
        <lombok.version>1.18.24</lombok.version>
        <assertj.version>3.23.1</assertj.version>
        <logback.version>1.2.11</logback.version>
        <gson.version>2.9.0</gson.version>
        <jna.version>5.11.0</jna.version>
        <lang3.version>3.12.0</lang3.version>
        <concurrent.version>1.0.2</concurrent.version>
        <surefire.plugin.version>3.0.0-M7</surefire.plugin.version>
        <maven.compiler.plugin>3.10.1</maven.compiler.plugin>
        <maven.deploy.plugin>3.0.0</maven.deploy.plugin>
        <commons-io.version>2.7</commons-io.version>
    </properties>

    <name>ton4j parent module</name>
    <description>Parent POM maven module</description>

    <url>https://github.com/neodiX42/ton4j</url>

    <licenses>
        <license>
            <name>GNU General Public License v3.0</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>neodiX</name>
            <email>neodiX@ton.org</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/neodiX42/ton4j.git</connection>
        <developerConnection>scm:git:ssh://github.com/neodiX42/ton4j.git</developerConnection>
        <url>https://github.com/neodiX42/ton4j/tree/main</url>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>${commons.version}</version>
            </dependency>
            <dependency>
                <groupId>org.purejava</groupId>
                <artifactId>tweetnacl-java</artifactId>
                <version>${tweetnacl.version}</version>
            </dependency>
            <!-- test -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.vmlens</groupId>
                <artifactId>concurrent-junit</artifactId>
                <version>${concurrent.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>${jna.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.plugin}</version>
                <type>maven-plugin</type>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${lang3.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <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>
        <plugins>
            <!--
            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>1.18.20.0</version>
                <configuration>
                    <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                    <outputDirectory>${project.basedir}/delombok</outputDirectory>
                    <addOutputDirectory>false</addOutputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>delombok</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.1</version>
                <configuration>
                    <!-- <sourcepath>${delombok.output}</sourcepath> -->
                    <doclint>none</doclint>
                    <excludePackageNames>org.ton.java.tonlib</excludePackageNames>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Maven GPG plugin  used to sign the components. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Nexus Staging Maven Plugin for Deployment and Release -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.13</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.plugin.version}</version>
                <configuration>
                    <argLine>
                        --add-opens java.base/java.lang=ALL-UNNAMED
                        --add-opens java.base/java.util=ALL-UNNAMED
                    </argLine>
                </configuration>
            </plugin>

            <!-- Release Deployment with the Maven Release Plugin -->
            <!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            -->
        </plugins>
    </build>
</project>