<?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.gitee.layneyt</groupId>
    <artifactId>chatgpt-sdk</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <name>ChatGpt SDK</name>
    <description>chatgpt-sdk</description>
    <url>https://gitee.com/layneyt/chatgpt-sdk</url>


    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>layneyt</id>
            <name>layneyt</name>
            <email>2431507510@qq.com</email>
            <roles>
                <role>Project Manager</role>
                <role>Architect</role>
            </roles>
        </developer>
    </developers>

    <scm>
        <connection>https://gitee.com/layneyt/chatgpt-sdk.git</connection>
        <url>https://gitee.com/layneyt/chatgpt-sdk</url>
    </scm>


    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <retrofit2.version>2.9.0</retrofit2.version>
        <slf4j.version>2.0.6</slf4j.version>
    </properties>

    <dependencies>
        <!-- SLF4J 是一个简单日志门面（Simple Logging Facade for Java），提供了统一的日志接口，允许在后台使用不同的日志实现 -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!-- SLF4J 的简单实现，用于在项目中提供默认的日志实现 -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!-- Jackson 是一个用于 Java 平台的多功能 JSON 库，jackson-databind 模块提供了 JSON 数据与 Java 对象之间的转换 -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.13.3</version>
        </dependency>

        <!-- Hutool 是一个 Java 工具包，提供了各种常用的工具类，包括字符串处理、日期时间处理、文件操作等 -->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.8.12</version>
        </dependency>

        <!-- OkHttp 是一个高效的 HTTP 客户端库，okhttp-sse 模块提供了对 Server-Sent Events（服务器推送事件）的支持 -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp-sse</artifactId>
            <version>3.14.9</version>
        </dependency>

        <!-- OkHttp 的日志拦截器，用于记录 HTTP 请求和响应的日志 -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>logging-interceptor</artifactId>
            <version>3.14.9</version>
        </dependency>

        <!--
             Retrofit 是一个基于 OkHttp 的类型安全的 HTTP 客户端库，用于简化 HTTP 请求的发送和响应处理
             Retrofit2 可以将 HTTP API 转化为 Java 接口，并通过注解的方式描述请求参数和响应结果等信息，
             从而方便地发送网络请求。具体可以的代码对 IOpenAiApi 的赋值实现
        -->
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>retrofit</artifactId>
            <version>${retrofit2.version}</version>
        </dependency>

        <!-- Retrofit 的 Jackson 转换器，用于在 Retrofit 中处理 JSON 数据 -->
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>converter-jackson</artifactId>
            <version>${retrofit2.version}</version>
        </dependency>

        <!-- Retrofit 的 RxJava 2 适配器，用于与 RxJava 2 结合使用，支持响应式编程风格 -->
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>adapter-rxjava2</artifactId>
            <version>${retrofit2.version}</version>
        </dependency>

        <!-- JUnit 是一个 Java 单元测试框架，用于编写和执行单元测试 -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <!-- JetBrains 的注解库，提供了一些常用的注解，用于标记代码中的元数据信息 -->
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>RELEASE</version>
            <scope>compile</scope>
        </dependency>

        <!-- JTokkit 是一个用于 Knuddels 开发的 Java 工具包，提供了与 Knuddels 平台交互的功能 -->
        <dependency>
            <groupId>com.knuddels</groupId>
            <artifactId>jtokkit</artifactId>
            <version>0.2.0</version>
        </dependency>

        <!-- Lombok 是一个 Java 库，用于通过注解简化 Java 代码的编写 -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20210307</version>
        </dependency>
    </dependencies>
    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <!-- Maven Surefire 插件配置 -->
            <!--
                Maven Surefire 插件用于执行单元测试。
                skipTests 设置为 true 表示跳过执行测试，这在某些情况下可能会加快构建速度。
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>

            <!-- Maven Compiler 插件配置 -->
            <!--
                Maven Compiler 插件用于编译 Java 代码。
                source 和 target 配置指定了源代码和目标字节码的版本，这里都设置为 8。
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
            <!--   central发布插件    -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.4.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>layneyt</publishingServerId>
                    <tokenAuth>true</tokenAuth>
                </configuration>
            </plugin>
            <!--   source源码插件 -->
            <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>
            <!--   javadoc插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <executable>E:\ProgramFiles\GnuPG\bin\gpg.exe</executable>
                    <keyname>layneyt</keyname>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>
</project>
