forgeboot/config/tasks/sourceTask.gradle.kts
gewuyou c22389d584 feat(webmvc): Add version control support
- Added ApiVersion annotations for version control of controllers and methods - Implement VersionAutoConfiguration automatic configuration class
- Add ApiVersionRequestMappingHandlerMapping to handle version mapping
- Update build configuration, support Spring Boot and version control
- Added Git-related configuration files
2025-04-26 14:04:44 +08:00

19 lines
742 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// This task creates a jar file with the source code of the project
tasks.register<Jar>("sourceTask") {
logger.info("正在配置${project.name}源代码 jar 文件...")
// 收集所有源代码(包括 Kotlin 和 Java
val sourceSet = project.extensions.getByType<SourceSetContainer>()["main"]
from(sourceSet.allSource) {
into("sources") // 将所有源代码放入子目录 sources
}
archiveClassifier.set("sources") // 设置生成文件的分类标识
logger.info("正在创建${project.name}源代码 jar 文件...")
logger.info("创建${project.name}源代码 jar 文件完成!")
}.configure {
group = "source"
description = "使用项目的源代码创建源代码 jar 文件"
}