Files
Game/pom.xml

154 lines
4.6 KiB
XML
Raw Normal View History

2025-09-19 08:13:07 +08:00
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2025-09-18 09:15:05 +08:00
<project xmlns="http://maven.apache.org/POM/4.0.0">
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<modelVersion>4.0.0</modelVersion>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<groupId>uno.mloluyu</groupId>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<artifactId>game</artifactId>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<version>1.0-SNAPSHOT</version>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<packaging>jar</packaging>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
2025-09-26 09:31:46 +08:00
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gdx.version>1.12.1</gdx.version>
</properties>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<dependencies>
2025-09-26 09:31:46 +08:00
<!-- Core LibGDX -->
<dependency>
2025-09-26 09:31:46 +08:00
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx</artifactId>
<version>${gdx.version}</version>
</dependency>
2025-09-25 18:43:36 +08:00
2025-09-26 09:31:46 +08:00
<!-- LWJGL2 Desktop Backend (使用 LwjglApplication 而不是 Lwjgl3Application) -->
<dependency>
2025-09-26 09:31:46 +08:00
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx-backend-lwjgl</artifactId>
<version>${gdx.version}</version>
</dependency>
2025-09-26 09:31:46 +08:00
<!-- 平台原生库(桌面) -->
2025-09-19 08:13:07 +08:00
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
2025-09-26 09:31:46 +08:00
<artifactId>gdx-platform</artifactId>
<version>${gdx.version}</version>
<classifier>natives-desktop</classifier>
2025-09-19 08:13:07 +08:00
</dependency>
2025-09-26 09:31:46 +08:00
<!-- FreeType 字体扩展 -->
2025-09-19 08:13:07 +08:00
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
2025-09-26 09:31:46 +08:00
<artifactId>gdx-freetype</artifactId>
<version>${gdx.version}</version>
2025-09-19 08:13:07 +08:00
</dependency>
<dependency>
<groupId>com.badlogicgames.gdx</groupId>
2025-09-26 09:31:46 +08:00
<artifactId>gdx-freetype-platform</artifactId>
<version>${gdx.version}</version>
2025-09-19 08:13:07 +08:00
<classifier>natives-desktop</classifier>
</dependency>
2025-09-26 09:31:46 +08:00
<!-- JUnit 5 -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
2025-09-19 08:13:07 +08:00
</dependencies>
<build>
<plugins>
2025-09-26 09:31:46 +08:00
<!-- 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>
2025-09-19 08:13:07 +08:00
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
2025-09-26 09:31:46 +08:00
<!-- 与 properties 中保持一致 -->
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<release>${maven.compiler.release}</release>
2025-09-19 08:13:07 +08:00
</configuration>
</plugin>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
2025-09-25 18:43:36 +08:00
<mainClass>uno.mloluyu.desktop.DesktopLauncher</mainClass>
2025-09-19 08:13:07 +08:00
</configuration>
</plugin>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
<!-- 添加运行时类路径配置,解决类找不到问题 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
2025-09-25 18:43:36 +08:00
<mainClass>uno.mloluyu.desktop.DesktopLauncher</mainClass>
2025-09-19 08:13:07 +08:00
</manifest>
</archive>
</configuration>
</plugin>
2025-09-26 09:31:46 +08:00
<!-- 运行 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>
2025-09-19 08:13:07 +08:00
</plugins>
</build>
2025-09-25 18:43:36 +08:00
2025-09-19 08:13:07 +08:00
</project>