mirror of
https://github.moeyy.xyz/https://github.com/GeWuYou/forgeboot
synced 2025-10-27 19:12:10 +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)
|
||||
// Kotlin Spring 支持
|
||||
alias(libs.plugins.kotlin.plugin.spring)
|
||||
// Kotlin kapt 支持
|
||||
alias (libs.plugins.kotlin.kapt)
|
||||
}
|
||||
|
||||
// 配置 SCM 版本插件
|
||||
@ -15,7 +17,7 @@ scmVersion {
|
||||
tag {
|
||||
prefix.set("") // 不加 v,生成 1.0.1 而不是 v1.0.1
|
||||
}
|
||||
versionIncrementer("incrementMinorIfNotOnRelease")
|
||||
versionIncrementer("incrementPatch")
|
||||
hooks {
|
||||
pre(
|
||||
"fileUpdate", mapOf(
|
||||
@ -58,13 +60,13 @@ allprojects {
|
||||
// 子项目配置
|
||||
subprojects {
|
||||
version = rootProject.version
|
||||
|
||||
afterEvaluate {
|
||||
val isRootModule = project.getPropertyByBoolean(ProjectFlags.IS_ROOT_MODULE)
|
||||
val isStarterModule = project.name.contains("starter")
|
||||
val parentProject = project.parent
|
||||
// 让父项目引入子项目
|
||||
parentProject?.dependencies?.add("api", project(project.path))
|
||||
if (isStarterModule && !isRootModule) {
|
||||
if (!isRootModule) {
|
||||
// Starter 模块依赖配置
|
||||
dependencies {
|
||||
implementation(platform(libs.springBootDependencies.bom))
|
||||
@ -81,19 +83,19 @@ subprojects {
|
||||
plugin(libs.plugins.maven.publish.get().pluginId)
|
||||
plugin(libs.plugins.kotlin.jvm.get().pluginId)
|
||||
plugin(libs.plugins.axionRelease.get().pluginId)
|
||||
plugin(libs.plugins.kotlin.kapt.get().pluginId)
|
||||
// 导入仓库配置
|
||||
from(file("$configDir/repositories.gradle.kts"))
|
||||
// 导入源代码任务
|
||||
from(file("$tasksDir/sourceTask.gradle.kts"))
|
||||
}
|
||||
|
||||
// 发布配置
|
||||
publishing {
|
||||
repositories {
|
||||
// 本地仓库
|
||||
maven {
|
||||
name = "localRepo"
|
||||
url = uri("file://D:/Maven/mvn_repository")
|
||||
url = uri("file://D:/Config/Jrebel/.jrebel/.m2/repository")
|
||||
}
|
||||
// GitHub Packages 仓库
|
||||
maven {
|
||||
|
||||
@ -8,12 +8,6 @@ repositories {
|
||||
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 {
|
||||
url = uri("https://maven.aliyun.com/repository/public/")
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ kotlinxSerializationJSON-version = "1.7.3"
|
||||
axion-release-version = "1.18.7"
|
||||
spring-cloud-version = "2024.0.1"
|
||||
spring-boot-version = "3.4.4"
|
||||
latest-release="latest.release"
|
||||
latest-release = "latest.release"
|
||||
slf4j-version = "2.0.17"
|
||||
[libraries]
|
||||
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-web = { group = "org.springframework.boot", name = "spring-boot-starter-web" }
|
||||
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" }
|
||||
|
||||
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" }
|
||||
|
||||
# Jackson
|
||||
jackson-core={group="com.fasterxml.jackson.core", name="jackson-core"}
|
||||
jackson-databind={group="com.fasterxml.jackson.core", name="jackson-databind"}
|
||||
jackson-annotations={group="com.fasterxml.jackson.core", name="jackson-annotations"}
|
||||
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-core = { group = "com.fasterxml.jackson.core", name = "jackson-core" }
|
||||
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind" }
|
||||
jackson-annotations = { group = "com.fasterxml.jackson.core", name = "jackson-annotations" }
|
||||
jackson-datatype-jsr310 = { group = "com.fasterxml.jackson.datatype", name = "jackson-datatype-jsr310" }
|
||||
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
|
||||
|
||||
[bundles]
|
||||
kotlinxEcosystem = ["kotlinxDatetime", "kotlinxSerialization", "kotlinxCoroutines-core"]
|
||||
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]
|
||||
# 应用 Java 插件,提供基本的 Java 代码编译和构建能力
|
||||
@ -63,3 +64,5 @@ maven-publish = { id = "maven-publish" }
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-version" }
|
||||
# 支持 Spring 的 Kotlin 插件
|
||||
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
|
||||
include(
|
||||
"forgeboot-webmvc",
|
||||
":forgeboot-webmvc:forgeboot-webmvc-version-starter",
|
||||
":forgeboot-webmvc:forgeboot-webmvc-logger-starter"
|
||||
":forgeboot-webmvc:version",
|
||||
":forgeboot-webmvc:logger",
|
||||
":forgeboot-webmvc:exception",
|
||||
":forgeboot-webmvc:dto",
|
||||
":forgeboot-webmvc:validation"
|
||||
)
|
||||
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:forgeboot-webmvc-logger-starter").name = "forgeboot-webmvc-logger-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:exception").name = "forgeboot-webmvc-exception-spring-boot-starter"
|
||||
project(":forgeboot-webmvc:dto").name = "forgeboot-webmvc-dto"
|
||||
project(":forgeboot-webmvc:validation").name = "forgeboot-validation"
|
||||
//endregion
|
||||
|
||||
//region module core
|
||||
@ -45,35 +51,33 @@ project(":forgeboot-core:forgeboot-core-extension").name = "forgeboot-core-exten
|
||||
|
||||
//region module i18n
|
||||
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: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
|
||||
|
||||
//region module webflux
|
||||
include(
|
||||
"forgeboot-webflux",
|
||||
)
|
||||
project(":forgeboot-webflux").name = "forgeboot-webflux-spring-boot-starter"
|
||||
//include(
|
||||
// "forgeboot-webflux",
|
||||
//)
|
||||
//project(":forgeboot-webflux").name = "forgeboot-webflux-spring-boot-starter"
|
||||
//endregion
|
||||
|
||||
//region module trace
|
||||
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"
|
||||
//endregion
|
||||
|
||||
//region module common
|
||||
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"
|
||||
project(":forgeboot-trace:forgeboot-trace-api").name = "forgeboot-trace-api"
|
||||
project(":forgeboot-trace:forgeboot-trace-impl").name = "forgeboot-trace-impl"
|
||||
project(":forgeboot-trace:forgeboot-trace-autoconfigure").name = "forgeboot-trace-autoconfigure"
|
||||
//endregion
|
||||
Loading…
x
Reference in New Issue
Block a user