# gradle-test-projects **Repository Path**: tkl1/gradle-test-projects ## Basic Information - **Project Name**: gradle-test-projects - **Description**: Gradle测试项目集合,用于在线扫描功能测试 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-23 - **Last Updated**: 2025-12-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Gradle测试项目集合 这些项目专门用于测试在线扫描的Gradle编译功能。 ## 项目列表 ### 1. test-helloworld (最简单) - **类型**: Spring Boot Web应用 - **用途**: 基础编译测试 - **测试命令**: `gradle clean build -x test` - **特点**: - 简单的REST API - H2内存数据库 - 单个模块 ### 2. test-microservice (中等复杂度) - **类型**: Spring Boot微服务 - **用途**: 微服务项目测试 - **测试命令**: `gradle clean build -x test` - **特点**: - RESTful API设计 - 数据传输对象 - Actuator健康检查 ### 3. test-library (Java库项目) - **类型**: Java工具库 - **用途**: 库项目编译测试 - **测试命令**: `gradle clean build -x test` - **特点**: - 数学工具类 - 字符串工具类 - 单元测试覆盖 ### 4. test-multimodule (多模块项目) - **类型**: 多模块Gradle项目 - **用途**: 复杂项目结构测试 - **测试命令**: `gradle clean build -x test` - **模块结构**: - `common`: 公共模块 - `service`: 服务模块 - `web`: Web应用模块 ## 测试建议 ### 开始测试顺序: 1. **test-helloworld** - 验证基本功能 2. **test-library** - 测试非Web项目 3. **test-microservice** - 测试标准Spring Boot 4. **test-multimodule** - 测试复杂项目结构 ### 编译命令示例: ```bash # 基础编译 gradle clean build -x test # 带代理的编译(如果需要网络访问) gradle clean build -x test -Dhttp.proxyHost=proxy.in.chaitin.net -Dhttp.proxyPort=8123 -Dhttps.proxyHost=proxy.in.chaitin.net -Dhttps.proxyPort=8123 # 多模块项目(指定模块) gradle :common:build :service:build :web:build -x test ``` ### 预期结果: - 所有项目都应该能够成功编译 - 编译时间应该在合理范围内(1-3分钟) - 不应该出现网络连接错误 - 不应该出现依赖下载失败 ## 项目特点 - **Java版本**: 全部使用Java 11 - **Gradle版本**: 兼容Gradle 6.x - 8.x - **无外部依赖**: 所有依赖都是Maven Central的标准库 - **结构简单**: 避免复杂的配置和特殊需求 - **测试友好**: 包含基本的单元测试 ## 分支说明 - **main**: 主分支,包含test-helloworld项目 - **test-microservice**: 微服务测试项目 - **test-library**: Java库测试项目 - **test-multimodule**: 多模块测试项目 ## 故障排查 如果编译失败,检查: 1. Java版本是否正确 2. Gradle版本是否兼容 3. 网络代理配置是否正确 4. 磁盘空间是否充足 5. 权限是否足够