<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2020-2026 Neural Layer
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      https://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!--suppress PackageUpdate -->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.1.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>roboquant-parent</artifactId>
    <groupId>org.roboquant</groupId>
    <version>3.0.0</version>
    <packaging>pom</packaging>
    <name>roboquant parent</name>
    <description>Algorithmic trading platform written in Kotlin</description>

    <!-- start extra info -->
    <url>https://roboquant.org</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>roboquant team</name>
            <organization>roboquant</organization>
            <url>https://www.roboquant.org</url>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/neurallayer/roboquant</url>
    </scm>
    <!-- end extra info -->

    <modules>
        <module>roboquant</module>
        <module>roboquant-avro</module>
        <module>roboquant-charts</module>
        <module>roboquant-jupyter</module>
        <module>roboquant-alpaca</module>
        <module>roboquant-questdb</module>
        <module>roboquant-ssr</module>
        <module>roboquant-ibkr</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <kotlin.code.style>official</kotlin.code.style>
        <kotlin.compiler.jvmTarget>17</kotlin.compiler.jvmTarget>
        <kotlin.compiler.incremental>false</kotlin.compiler.incremental>
        <kotlin.version>2.2.0</kotlin.version>
        <kotlin.compiler.languageVersion>2.2</kotlin.compiler.languageVersion>
        <kotlin.compiler.apiVersion>2.2</kotlin.compiler.apiVersion>
        <slf4j.version>2.0.17</slf4j.version>
        <ibkr.version>10.19</ibkr.version>
        <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests>
        <skipIntegrationTests>true</skipIntegrationTests>
        <dokka.includes>docs/dokka</dokka.includes>
    </properties>

    <repositories>
        <repository>
            <id>mavenCentral</id>
            <url>https://repo1.maven.org/maven2/</url>
        </repository>
    </repositories>

    <distributionManagement>
        <!-- repository>
            <name>Maven Central Repository</name>
            <id>mavenCentral</id>
            <url>https://repo1.maven.org/maven2/</url>
        </repository -->
        <snapshotRepository>
            <name>Central Portal Snapshots</name>
            <id>central-portal-snapshots</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>


    <build>
        <sourceDirectory>${basedir}/src/main/kotlin</sourceDirectory>
        <testSourceDirectory>${basedir}/src/test/kotlin</testSourceDirectory>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>test-compile</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <args>
                            <!-- arg>-language-version=2.0</arg -->
                            <!-- arg>-kotlin.experimental.tryK2=true</arg -->
                            <!-- arg>-Xbackend-threads=0</arg -->
                            <!-- arg>-Xcontext-receivers</arg -->
                            <!-- arg>-Xexplicit-api=strict</arg -->
                        </args>
                    </configuration>

                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.5.3</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                    <configuration>
                        <propertiesEncoding>ISO-8859-1</propertiesEncoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.5.3</version>
                    <configuration>
                        <consoleOutputReporter
                                implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5ConsoleOutputReporter"/>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.13</version>
                    <executions>
                        <execution>
                            <id>prepare-agent</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </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>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <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>false</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <version>2.1.0</version>
                <executions>
                    <execution>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>dokka</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>dokka-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>javadocJar</goal>
                        </goals>
                    </execution>
                </executions>

                <configuration>
                    <jdkVersion>17</jdkVersion>
                    <suppressObviousFunctions>true</suppressObviousFunctions>
                    <reportUndocumented>true</reportUndocumented>
                    <suppressInheritedMembers>true</suppressInheritedMembers>
                    <includes>
                        <include>${dokka.includes}/roboquant.md</include>
                        <include>${dokka.includes}/roboquant-alpaca.md</include>
                        <include>${dokka.includes}/roboquant-polygon.md</include>
                        <include>${dokka.includes}/roboquant-binance.md</include>
                        <include>${dokka.includes}/roboquant-xchange.md</include>
                        <include>${dokka.includes}/roboquant-server.md</include>
                        <include>${dokka.includes}/roboquant-questdb.md</include>
                        <include>${dokka.includes}/roboquant-avro.md</include>
                        <include>${dokka.includes}/roboquant-ibkr.md</include>
                        <include>${dokka.includes}/roboquant-jupyter.md</include>
                        <include>${dokka.includes}/roboquant-ta.md</include>
                    </includes>
                    <sourceLinks>
                        <link>
                            <path>${basedir}/src/main/kotlin</path>
                            <url>
                                https://github.com/neurallayer/roboquant/blob/main/${project.artifactId}/src/main/kotlin
                            </url>
                            <lineSuffix>#L</lineSuffix>
                        </link>
                    </sourceLinks>
                </configuration>
            </plugin>
            <!-- We don't use Java, so lets disable the Java compiler plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.0</version>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                </configuration>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.ozsie</groupId>
                <artifactId>detekt-maven-plugin</artifactId>
                <version>1.23.8</version>
                <configuration>
                    <config>docs/run/detekt.yml</config>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- Dependencies used by all modules -->
    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <!--suppress KotlinMavenPluginPhase -->
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit5</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <!-- Dependencies used by some modules -->
    <dependencyManagement>
        <dependencies>
            <!-- enforce standard versions of following libraries across modules -->
            <dependency>
                <artifactId>roboquant</artifactId>
                <groupId>org.roboquant</groupId>
                <version>${project.version}</version>
            </dependency>
            <!-- end standard versions -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.19.0</version>
            </dependency>
            <dependency>
                <artifactId>roboquant</artifactId>
                <groupId>org.roboquant</groupId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>
