mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-28 20:06:39 +08:00
feat(build): Optimize project construction and add international support
- Add Kotlin JVM plugin and configure source code and documentation Jar - Added international support module - Updated project version and naming - Remove redundant source code task configuration
This commit is contained in:
parent
6e6099b02b
commit
58593f7b21
@ -9,7 +9,12 @@ plugins {
|
|||||||
// Kotlin Spring 支持
|
// Kotlin Spring 支持
|
||||||
alias(libs.plugins.kotlin.plugin.spring)
|
alias(libs.plugins.kotlin.plugin.spring)
|
||||||
// Kotlin kapt 支持
|
// Kotlin kapt 支持
|
||||||
alias (libs.plugins.kotlin.kapt)
|
alias(libs.plugins.kotlin.kapt)
|
||||||
|
id(libs.plugins.kotlin.jvm.get().pluginId)
|
||||||
|
}
|
||||||
|
java {
|
||||||
|
withSourcesJar()
|
||||||
|
withJavadocJar()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配置 SCM 版本插件
|
// 配置 SCM 版本插件
|
||||||
@ -59,8 +64,6 @@ allprojects {
|
|||||||
|
|
||||||
// 子项目配置
|
// 子项目配置
|
||||||
subprojects {
|
subprojects {
|
||||||
version = rootProject.version
|
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
val isRootModule = project.getPropertyByBoolean(ProjectFlags.IS_ROOT_MODULE)
|
val isRootModule = project.getPropertyByBoolean(ProjectFlags.IS_ROOT_MODULE)
|
||||||
val parentProject = project.parent
|
val parentProject = project.parent
|
||||||
@ -77,6 +80,24 @@ subprojects {
|
|||||||
}
|
}
|
||||||
// 应用插件和配置
|
// 应用插件和配置
|
||||||
val libs = rootProject.libs
|
val libs = rootProject.libs
|
||||||
|
plugins.withId(libs.plugins.java.get().pluginId) {
|
||||||
|
extensions.configure<JavaPluginExtension> {
|
||||||
|
withSourcesJar()
|
||||||
|
withJavadocJar()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
plugins.withId(libs.plugins.forgeboot.i18n.keygen.get().pluginId) {
|
||||||
|
tasks.named("kotlinSourcesJar") {
|
||||||
|
dependsOn("generateI18nKeys")
|
||||||
|
}
|
||||||
|
tasks.named<Jar>("sourcesJar") {
|
||||||
|
dependsOn("generateI18nKeys")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
version = rootProject.version
|
||||||
|
|
||||||
apply {
|
apply {
|
||||||
plugin(libs.plugins.java.get().pluginId)
|
plugin(libs.plugins.java.get().pluginId)
|
||||||
plugin(libs.plugins.javaLibrary.get().pluginId)
|
plugin(libs.plugins.javaLibrary.get().pluginId)
|
||||||
@ -86,8 +107,6 @@ subprojects {
|
|||||||
plugin(libs.plugins.kotlin.kapt.get().pluginId)
|
plugin(libs.plugins.kotlin.kapt.get().pluginId)
|
||||||
// 导入仓库配置
|
// 导入仓库配置
|
||||||
from(file("$configDir/repositories.gradle.kts"))
|
from(file("$configDir/repositories.gradle.kts"))
|
||||||
// 导入源代码任务
|
|
||||||
from(file("$tasksDir/sourceTask.gradle.kts"))
|
|
||||||
}
|
}
|
||||||
// 发布配置
|
// 发布配置
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@ -29,6 +29,7 @@ include(
|
|||||||
":forgeboot-webmvc:version",
|
":forgeboot-webmvc:version",
|
||||||
":forgeboot-webmvc:logger",
|
":forgeboot-webmvc:logger",
|
||||||
":forgeboot-webmvc:exception",
|
":forgeboot-webmvc:exception",
|
||||||
|
":forgeboot-webmvc:exception-i18n",
|
||||||
":forgeboot-webmvc:dto",
|
":forgeboot-webmvc:dto",
|
||||||
":forgeboot-webmvc:validation",
|
":forgeboot-webmvc:validation",
|
||||||
":forgeboot-webmvc:spec"
|
":forgeboot-webmvc:spec"
|
||||||
@ -37,6 +38,7 @@ project(":forgeboot-webmvc").name = "forgeboot-webmvc-spring-boot-starter"
|
|||||||
project(":forgeboot-webmvc:version").name = "forgeboot-webmvc-version-spring-boot-starter"
|
project(":forgeboot-webmvc:version").name = "forgeboot-webmvc-version-spring-boot-starter"
|
||||||
project(":forgeboot-webmvc:logger").name = "forgeboot-webmvc-logger-spring-boot-starter"
|
project(":forgeboot-webmvc:logger").name = "forgeboot-webmvc-logger-spring-boot-starter"
|
||||||
project(":forgeboot-webmvc:exception").name = "forgeboot-webmvc-exception-spring-boot-starter"
|
project(":forgeboot-webmvc:exception").name = "forgeboot-webmvc-exception-spring-boot-starter"
|
||||||
|
project(":forgeboot-webmvc:exception-i18n").name = "forgeboot-webmvc-exception-i18n-spring-boot-starter"
|
||||||
project(":forgeboot-webmvc:dto").name = "forgeboot-webmvc-dto"
|
project(":forgeboot-webmvc:dto").name = "forgeboot-webmvc-dto"
|
||||||
project(":forgeboot-webmvc:validation").name = "forgeboot-webmvc-validation"
|
project(":forgeboot-webmvc:validation").name = "forgeboot-webmvc-validation"
|
||||||
project(":forgeboot-webmvc:spec").name = "forgeboot-webmvc-spec"
|
project(":forgeboot-webmvc:spec").name = "forgeboot-webmvc-spec"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user