<?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>
    <parent>
        <groupId>me.kpavlov.langchain4j.kotlin</groupId>
        <artifactId>root</artifactId>
        <version>0.3.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>langchain4j-kotlin</artifactId>
    <name>LangChain4j-Kotlin :: Core</name>

    <dependencies>
        <dependency>
            <groupId>dev.langchain4j</groupId>
            <artifactId>langchain4j-core</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
        </dependency>
        <dependency>
            <groupId>dev.langchain4j</groupId>
            <artifactId>langchain4j</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlinx</groupId>
            <artifactId>kotlinx-coroutines-core-jvm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <!-- Test Dependencies -->
        <dependency>
            <groupId>dev.langchain4j</groupId>
            <artifactId>langchain4j-open-ai</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>me.kpavlov.finchly</groupId>
            <artifactId>finchly</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito.kotlin</groupId>
            <artifactId>mockito-kotlin</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>me.kpavlov.aimocks</groupId>
            <artifactId>ai-mocks-openai-jvm</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-assertions-core-jvm</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <configuration combine.self="append">
                    <sourceLinks>
                        <link>
                            <path>src/main/kotlin</path>
                            <url>
                                https://github.com/kpavlov/langchain4j-kotlin/tree/main/langchain4j-kotlin/src/main/kotlin
                            </url>
                            <lineSuffix>#L</lineSuffix>
                        </link>
                    </sourceLinks>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>linux</id>
            <activation>
                <os>
                    <family>unix</family>
                    <name>Linux</name>
                </os>
            </activation>
            <dependencies>
                <!-- Netty native transport for Linux -->
                <dependency>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport-native-epoll</artifactId>
                    <classifier>linux-x86_64</classifier>
                    <scope>runtime</scope>
                    <optional>true</optional>
                </dependency>
                <dependency>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport-native-epoll</artifactId>
                    <classifier>linux-aarch_64</classifier>
                    <scope>runtime</scope>
                    <optional>true</optional>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>mac</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>
            <dependencies>
                <!-- Netty native transport for macOS -->
                <dependency>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport-native-kqueue</artifactId>
                    <classifier>osx-x86_64</classifier>
                    <scope>runtime</scope>
                    <optional>true</optional>
                </dependency>
                <dependency>
                    <groupId>io.netty</groupId>
                    <artifactId>netty-transport-native-kqueue</artifactId>
                    <classifier>osx-aarch_64</classifier>
                    <scope>runtime</scope>
                    <optional>true</optional>
                </dependency>
            </dependencies>
        </profile>

    </profiles>

</project>
