mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-28 01:58:54 +08:00
build(gradle): Update the project build configuration
- Remove invalid Maven repositories - Add the Kotlin kapt plugin - Modify the version number increment rule - Update the submodule name and structure - Adjusted the inclusion of the internationalization (i18n) and trace modules - Remove references to common modules
This commit is contained in:
parent
b44b5a1570
commit
b58cb6b339
@ -8,6 +8,8 @@ plugins {
|
|||||||
alias(libs.plugins.axionRelease)
|
alias(libs.plugins.axionRelease)
|
||||||
// Kotlin Spring 支持
|
// Kotlin Spring 支持
|
||||||
alias(libs.plugins.kotlin.plugin.spring)
|
alias(libs.plugins.kotlin.plugin.spring)
|
||||||
|
// Kotlin kapt 支持
|
||||||
|
alias (libs.plugins.kotlin.kapt)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配置 SCM 版本插件
|
// 配置 SCM 版本插件
|
||||||
@ -15,7 +17,7 @@ scmVersion {
|
|||||||
tag {
|
tag {
|
||||||
prefix.set("") // 不加 v,生成 1.0.1 而不是 v1.0.1
|
prefix.set("") // 不加 v,生成 1.0.1 而不是 v1.0.1
|
||||||
}
|
}
|
||||||
versionIncrementer("incrementMinorIfNotOnRelease")
|
versionIncrementer("incrementPatch")
|
||||||
hooks {
|
hooks {
|
||||||
pre(
|
pre(
|
||||||
"fileUpdate", mapOf(
|
"fileUpdate", mapOf(
|
||||||
@ -58,13 +60,13 @@ allprojects {
|
|||||||
// 子项目配置
|
// 子项目配置
|
||||||
subprojects {
|
subprojects {
|
||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
val isRootModule = project.getPropertyByBoolean(ProjectFlags.IS_ROOT_MODULE)
|
val isRootModule = project.getPropertyByBoolean(ProjectFlags.IS_ROOT_MODULE)
|
||||||
val isStarterModule = project.name.contains("starter")
|
|
||||||
val parentProject = project.parent
|
val parentProject = project.parent
|
||||||
// 让父项目引入子项目
|
// 让父项目引入子项目
|
||||||
parentProject?.dependencies?.add("api", project(project.path))
|
parentProject?.dependencies?.add("api", project(project.path))
|
||||||
if (isStarterModule && !isRootModule) {
|
if (!isRootModule) {
|
||||||
// Starter 模块依赖配置
|
// Starter 模块依赖配置
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform(libs.springBootDependencies.bom))
|
implementation(platform(libs.springBootDependencies.bom))
|
||||||
@ -81,19 +83,19 @@ subprojects {
|
|||||||
plugin(libs.plugins.maven.publish.get().pluginId)
|
plugin(libs.plugins.maven.publish.get().pluginId)
|
||||||
plugin(libs.plugins.kotlin.jvm.get().pluginId)
|
plugin(libs.plugins.kotlin.jvm.get().pluginId)
|
||||||
plugin(libs.plugins.axionRelease.get().pluginId)
|
plugin(libs.plugins.axionRelease.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"))
|
from(file("$tasksDir/sourceTask.gradle.kts"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发布配置
|
// 发布配置
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
// 本地仓库
|
// 本地仓库
|
||||||
maven {
|
maven {
|
||||||
name = "localRepo"
|
name = "localRepo"
|
||||||
url = uri("file://D:/Maven/mvn_repository")
|
url = uri("file://D:/Config/Jrebel/.jrebel/.m2/repository")
|
||||||
}
|
}
|
||||||
// GitHub Packages 仓库
|
// GitHub Packages 仓库
|
||||||
maven {
|
maven {
|
||||||
|
|||||||
@ -8,12 +8,6 @@ repositories {
|
|||||||
isAllowInsecureProtocol = true
|
isAllowInsecureProtocol = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maven {
|
|
||||||
url = uri("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev")
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
url = uri("https://raw.githubusercontent.com/eurotech/kura_addons/mvn-repo/")
|
|
||||||
}
|
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://maven.aliyun.com/repository/public/")
|
url = uri("https://maven.aliyun.com/repository/public/")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,7 @@ kotlinxSerializationJSON-version = "1.7.3"
|
|||||||
axion-release-version = "1.18.7"
|
axion-release-version = "1.18.7"
|
||||||
spring-cloud-version = "2024.0.1"
|
spring-cloud-version = "2024.0.1"
|
||||||
spring-boot-version = "3.4.4"
|
spring-boot-version = "3.4.4"
|
||||||
latest-release="latest.release"
|
latest-release = "latest.release"
|
||||||
slf4j-version = "2.0.17"
|
slf4j-version = "2.0.17"
|
||||||
[libraries]
|
[libraries]
|
||||||
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-version" }
|
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin-version" }
|
||||||
@ -27,25 +27,26 @@ springBootDependencies-bom = { module = "org.springframework.boot:spring-boot-de
|
|||||||
springBootStarter-aop = { group = "org.springframework.boot", name = "spring-boot-starter-aop" }
|
springBootStarter-aop = { group = "org.springframework.boot", name = "spring-boot-starter-aop" }
|
||||||
springBootStarter-web = { group = "org.springframework.boot", name = "spring-boot-starter-web" }
|
springBootStarter-web = { group = "org.springframework.boot", name = "spring-boot-starter-web" }
|
||||||
springBootStarter-webflux = { group = "org.springframework.boot", name = "spring-boot-starter-webflux" }
|
springBootStarter-webflux = { group = "org.springframework.boot", name = "spring-boot-starter-webflux" }
|
||||||
|
springBootStarter-validation = { group = "org.springframework.boot", name = "spring-boot-starter-validation" }
|
||||||
springBoot-configuration-processor = { group = "org.springframework.boot", name = "spring-boot-configuration-processor", version.ref = "spring-boot-version" }
|
springBoot-configuration-processor = { group = "org.springframework.boot", name = "spring-boot-configuration-processor", version.ref = "spring-boot-version" }
|
||||||
|
|
||||||
springCloudDependencies-bom = { module = "org.springframework.cloud:spring-cloud-dependencies", version.ref = "spring-cloud-version" }
|
springCloudDependencies-bom = { module = "org.springframework.cloud:spring-cloud-dependencies", version.ref = "spring-cloud-version" }
|
||||||
springCloudStarter-openfeign = { group = "org.springframework.cloud", name = "spring-cloud-starter-openfeign" }
|
springCloudStarter-openfeign = { group = "org.springframework.cloud", name = "spring-cloud-starter-openfeign" }
|
||||||
|
|
||||||
# Jackson
|
# Jackson
|
||||||
jackson-core={group="com.fasterxml.jackson.core", name="jackson-core"}
|
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core" }
|
||||||
jackson-databind={group="com.fasterxml.jackson.core", name="jackson-databind"}
|
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind" }
|
||||||
jackson-annotations={group="com.fasterxml.jackson.core", name="jackson-annotations"}
|
jackson-annotations = { group = "com.fasterxml.jackson.core", name = "jackson-annotations" }
|
||||||
jackson-datatype-jsr310={group="com.fasterxml.jackson.datatype", name="jackson-datatype-jsr310"}
|
jackson-datatype-jsr310 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jsr310" }
|
||||||
jackson-module-kotlin={group="com.fasterxml.jackson.module", name="jackson-module-kotlin"}
|
jackson-module-kotlin = { group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin" }
|
||||||
|
|
||||||
reactor-core={group="io.projectreactor", name="reactor-core"}
|
reactor-core = { group = "io.projectreactor", name = "reactor-core" }
|
||||||
# Libraries can be bundled together for easier import
|
# Libraries can be bundled together for easier import
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
kotlinxEcosystem = ["kotlinxDatetime", "kotlinxSerialization", "kotlinxCoroutines-core"]
|
kotlinxEcosystem = ["kotlinxDatetime", "kotlinxSerialization", "kotlinxCoroutines-core"]
|
||||||
jacksonAll = [
|
jacksonAll = [
|
||||||
"jackson-core", "jackson-databind", "jackson-annotations","jackson-datatype-jsr310", "jackson-module-kotlin"
|
"jackson-core", "jackson-databind", "jackson-annotations", "jackson-datatype-jsr310", "jackson-module-kotlin"
|
||||||
]
|
]
|
||||||
[plugins]
|
[plugins]
|
||||||
# 应用 Java 插件,提供基本的 Java 代码编译和构建能力
|
# 应用 Java 插件,提供基本的 Java 代码编译和构建能力
|
||||||
@ -63,3 +64,5 @@ maven-publish = { id = "maven-publish" }
|
|||||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" }
|
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" }
|
||||||
# 支持 Spring 的 Kotlin 插件
|
# 支持 Spring 的 Kotlin 插件
|
||||||
kotlin-plugin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin-version" }
|
kotlin-plugin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin-version" }
|
||||||
|
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt" }
|
||||||
|
forgeboot-i18n-keygen = { id = "i18n-key-gen" }
|
||||||
|
|||||||
@ -26,12 +26,18 @@ rootProject.name = "forgeboot"
|
|||||||
//region module webmvc
|
//region module webmvc
|
||||||
include(
|
include(
|
||||||
"forgeboot-webmvc",
|
"forgeboot-webmvc",
|
||||||
":forgeboot-webmvc:forgeboot-webmvc-version-starter",
|
":forgeboot-webmvc:version",
|
||||||
":forgeboot-webmvc:forgeboot-webmvc-logger-starter"
|
":forgeboot-webmvc:logger",
|
||||||
|
":forgeboot-webmvc:exception",
|
||||||
|
":forgeboot-webmvc:dto",
|
||||||
|
":forgeboot-webmvc:validation"
|
||||||
)
|
)
|
||||||
project(":forgeboot-webmvc").name = "forgeboot-webmvc-spring-boot-starter"
|
project(":forgeboot-webmvc").name = "forgeboot-webmvc-spring-boot-starter"
|
||||||
project(":forgeboot-webmvc:forgeboot-webmvc-version-starter").name = "forgeboot-webmvc-version-spring-boot-starter"
|
project(":forgeboot-webmvc:version").name = "forgeboot-webmvc-version-spring-boot-starter"
|
||||||
project(":forgeboot-webmvc:forgeboot-webmvc-logger-starter").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:dto").name = "forgeboot-webmvc-dto"
|
||||||
|
project(":forgeboot-webmvc:validation").name = "forgeboot-validation"
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region module core
|
//region module core
|
||||||
@ -45,35 +51,33 @@ project(":forgeboot-core:forgeboot-core-extension").name = "forgeboot-core-exten
|
|||||||
|
|
||||||
//region module i18n
|
//region module i18n
|
||||||
include(
|
include(
|
||||||
"forgeboot-i18n"
|
"forgeboot-i18n",
|
||||||
|
":forgeboot-i18n:forgeboot-i18n-api",
|
||||||
|
":forgeboot-i18n:forgeboot-i18n-impl",
|
||||||
|
":forgeboot-i18n:forgeboot-i18n-autoconfigure"
|
||||||
)
|
)
|
||||||
project(":forgeboot-i18n").name = "forgeboot-i18n-spring-boot-starter"
|
project(":forgeboot-i18n").name = "forgeboot-i18n-spring-boot-starter"
|
||||||
|
project(":forgeboot-i18n:forgeboot-i18n-api").name = "forgeboot-i18n-api"
|
||||||
|
project(":forgeboot-i18n:forgeboot-i18n-impl").name = "forgeboot-i18n-impl"
|
||||||
|
project(":forgeboot-i18n:forgeboot-i18n-autoconfigure").name = "forgeboot-i18n-autoconfigure"
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region module webflux
|
//region module webflux
|
||||||
include(
|
//include(
|
||||||
"forgeboot-webflux",
|
// "forgeboot-webflux",
|
||||||
)
|
//)
|
||||||
project(":forgeboot-webflux").name = "forgeboot-webflux-spring-boot-starter"
|
//project(":forgeboot-webflux").name = "forgeboot-webflux-spring-boot-starter"
|
||||||
//endregion
|
//endregion
|
||||||
|
|
||||||
//region module trace
|
//region module trace
|
||||||
include(
|
include(
|
||||||
"forgeboot-trace"
|
"forgeboot-trace",
|
||||||
|
":forgeboot-trace:forgeboot-trace-api",
|
||||||
|
":forgeboot-trace:forgeboot-trace-impl",
|
||||||
|
":forgeboot-trace:forgeboot-trace-autoconfigure",
|
||||||
)
|
)
|
||||||
project(":forgeboot-trace").name = "forgeboot-trace-spring-boot-starter"
|
project(":forgeboot-trace").name = "forgeboot-trace-spring-boot-starter"
|
||||||
//endregion
|
project(":forgeboot-trace:forgeboot-trace-api").name = "forgeboot-trace-api"
|
||||||
|
project(":forgeboot-trace:forgeboot-trace-impl").name = "forgeboot-trace-impl"
|
||||||
//region module common
|
project(":forgeboot-trace:forgeboot-trace-autoconfigure").name = "forgeboot-trace-autoconfigure"
|
||||||
include(
|
|
||||||
"forgeboot-common",
|
|
||||||
":forgeboot-common:forgeboot-common-result",
|
|
||||||
":forgeboot-common:forgeboot-common-result:forgeboot-common-result-api",
|
|
||||||
":forgeboot-common:forgeboot-common-result:forgeboot-common-result-impl",
|
|
||||||
// ":forgeboot-common:forgeboot-common-result:forgeboot-common-result-extension",
|
|
||||||
)
|
|
||||||
project(":forgeboot-common").name = "forgeboot-common"
|
|
||||||
project(":forgeboot-common:forgeboot-common-result").name = "forgeboot-common-result"
|
|
||||||
project(":forgeboot-common:forgeboot-common-result:forgeboot-common-result-api").name = "forgeboot-common-result-api"
|
|
||||||
project(":forgeboot-common:forgeboot-common-result:forgeboot-common-result-impl").name = "forgeboot-common-result-impl"
|
|
||||||
//endregion
|
//endregion
|
||||||
Loading…
x
Reference in New Issue
Block a user