160 lines
4.8 KiB
XML
160 lines
4.8 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>uno.mloluyu</groupId>
|
|
|
|
<artifactId>game</artifactId>
|
|
|
|
<version>1.0-SNAPSHOT</version>
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
<properties>
|
|
<maven.compiler.source>21</maven.compiler.source>
|
|
<maven.compiler.target>21</maven.compiler.target>
|
|
<maven.compiler.release>21</maven.compiler.release>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<gdx.version>1.12.1</gdx.version>
|
|
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- Core LibGDX -->
|
|
<dependency>
|
|
<groupId>com.badlogicgames.gdx</groupId>
|
|
<artifactId>gdx</artifactId>
|
|
<version>${gdx.version}</version>
|
|
</dependency>
|
|
|
|
<!-- LWJGL2 Desktop Backend (使用 LwjglApplication 而不是 Lwjgl3Application) -->
|
|
<dependency>
|
|
<groupId>com.badlogicgames.gdx</groupId>
|
|
<artifactId>gdx-backend-lwjgl</artifactId>
|
|
<version>${gdx.version}</version>
|
|
</dependency>
|
|
|
|
<!-- 平台原生库(桌面) -->
|
|
<dependency>
|
|
<groupId>com.badlogicgames.gdx</groupId>
|
|
<artifactId>gdx-platform</artifactId>
|
|
<version>${gdx.version}</version>
|
|
<classifier>natives-desktop</classifier>
|
|
</dependency>
|
|
|
|
<!-- FreeType 字体扩展 -->
|
|
<dependency>
|
|
<groupId>com.badlogicgames.gdx</groupId>
|
|
<artifactId>gdx-freetype</artifactId>
|
|
<version>${gdx.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.badlogicgames.gdx</groupId>
|
|
<artifactId>gdx-freetype-platform</artifactId>
|
|
<version>${gdx.version}</version>
|
|
<classifier>natives-desktop</classifier>
|
|
</dependency>
|
|
<!-- JUnit 5 -->
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<version>5.10.2</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<!-- gdx-ai 行为树 / FSM / Steering -->
|
|
<dependency>
|
|
<groupId>com.badlogicgames.gdx</groupId>
|
|
<artifactId>gdx-ai</artifactId>
|
|
<version>1.8.2</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<!-- Enforcer 防止依赖冲突 / 旧 JDK -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<version>3.4.1</version>
|
|
<executions>
|
|
<execution>
|
|
<id>enforce</id>
|
|
<goals><goal>enforce</goal></goals>
|
|
<configuration>
|
|
<rules>
|
|
<requireJavaVersion>
|
|
<version>[21,)</version>
|
|
</requireJavaVersion>
|
|
<dependencyConvergence/>
|
|
</rules>
|
|
<fail>false</fail>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.13.0</version>
|
|
<configuration>
|
|
<!-- 与 properties 中保持一致 -->
|
|
<source>${maven.compiler.source}</source>
|
|
<target>${maven.compiler.target}</target>
|
|
<release>${maven.compiler.release}</release>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
<version>3.1.0</version>
|
|
<configuration>
|
|
<mainClass>uno.mloluyu.desktop.DesktopLauncher</mainClass>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- 添加运行时类路径配置,解决类找不到问题 -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<addClasspath>true</addClasspath>
|
|
<mainClass>uno.mloluyu.desktop.DesktopLauncher</mainClass>
|
|
</manifest>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
<!-- 运行 JUnit 5 -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>3.2.5</version>
|
|
<configuration>
|
|
<useSystemClassLoader>false</useSystemClassLoader>
|
|
</configuration>
|
|
</plugin>
|
|
<!-- 初步覆盖率,仅生成报告,不设阈值 -->
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>0.8.11</version>
|
|
<executions>
|
|
<execution>
|
|
<goals><goal>prepare-agent</goal></goals>
|
|
</execution>
|
|
<execution>
|
|
<id>report</id>
|
|
<phase>test</phase>
|
|
<goals><goal>report</goal></goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
|
|
</project>
|