<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>cool.scx</groupId>
        <artifactId>scx-parent</artifactId>
        <version>26</version>
        <relativePath/>
    </parent>

    <artifactId>live-room-watcher</artifactId>
    <version>0.3.30</version>

    <name>Live Room Watcher</name>
    <url>https://github.com/scx567888/live-room-watcher</url>
    <description>
        Live Room Watcher
    </description>

    <developers>
        <developer>
            <id>scx567888</id>
            <name>scx567888</name>
            <email>scx567888@outlook.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/scx567888/live-room-watcher/blob/master/LICENSE</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:https://github.com/scx567888/live-room-watcher.git</connection>
        <developerConnection>scm:git:https://github.com/scx567888/live-room-watcher.git</developerConnection>
        <url>https://github.com/scx567888/live-room-watcher</url>
    </scm>

    <dependencies>

        <dependency>
            <groupId>cool.scx</groupId>
            <artifactId>scx-http-x</artifactId>
            <version>${scx.version}</version>
        </dependency>

        <dependency>
            <groupId>cool.scx</groupId>
            <artifactId>scx-ansi</artifactId>
            <version>${scx.version}</version>
        </dependency>

        <dependency>
            <groupId>cool.scx</groupId>
            <artifactId>scx-logging</artifactId>
            <version>${scx.version}</version>
        </dependency>

        <dependency>
            <groupId>cool.scx</groupId>
            <artifactId>scx-scheduling</artifactId>
            <version>${scx.version}</version>
        </dependency>

        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>${protobuf.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>${jsoup.version}</version>
        </dependency>

        <dependency>
            <groupId>org.graalvm.polyglot</groupId>
            <artifactId>polyglot</artifactId>
            <version>${graalvm-js.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.graalvm.polyglot</groupId>
            <artifactId>js</artifactId>
            <version>${graalvm-js.version}</version>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.microsoft.playwright</groupId>
            <artifactId>playwright</artifactId>
            <version>${playwright.version}</version>
        </dependency>

    </dependencies>

    <build>

        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>${os-maven-plugin.version}</version>
            </extension>
        </extensions>

        <plugins>

            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>${protobuf-maven-plugin.version}</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
                    <protoSourceRoot>${project.basedir}/src/main/proto</protoSourceRoot>
                    <outputDirectory>${project.build.sourceDirectory}</outputDirectory>
                    <clearOutputDirectory>false</clearOutputDirectory>
                    <useArgumentFile>true</useArgumentFile>
                </configuration>

                <executions>
                    <execution>
                        <!-- 这个插件的默认生命周期为 generate-sources. -->
                        <goals>
                            <!-- 执行编译 -->
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <!-- 因为 scx 并不是可执行 jar 包, 所以此处不添加 classpath 到描述文件中 -->
                            <addClasspath>false</addClasspath>
                        </manifest>
                    </archive>
                    <excludes>
                        <exclude>/douyin_hack/</exclude>
                        <exclude>/tiktok_hack/</exclude>
                        <exclude>/*.proto</exclude>
                        <!-- 默认 git 占位空文件 -->
                        <exclude>/.gitkeep</exclude>
                    </excludes>
                </configuration>
            </plugin>

        </plugins>

    </build>

    <properties>
        <scx.mainClass>cool.scx.live_room_watcher.Main</scx.mainClass>
        <scx.version>3.3.6</scx.version>
        <protobuf.version>4.29.0</protobuf.version>
        <jsoup.version>1.18.3</jsoup.version>
        <graalvm-js.version>24.1.1</graalvm-js.version>
        <slf4j.version>2.0.16</slf4j.version>
        <testng.version>7.10.2</testng.version>
        <playwright.version>1.49.0</playwright.version>
        <protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
        <os-maven-plugin.version>1.7.1</os-maven-plugin.version>
    </properties>

</project>
