From 05a8d3d409352633dd50efb8b69e0fde3f2aca7e Mon Sep 17 00:00:00 2001 From: gewuyou Date: Thu, 5 Jun 2025 16:11:54 +0800 Subject: [PATCH] build: Update project structure and configuration - Remove related files from the forgeboot-webflux module -Refactor settings.gradle.kts file to optimize project configuration and structure - Add forgeboot-context, forgeboot-core, forgeboot-i18n and forgeboot-trace modules - Update project dependency management and plug-in configuration --- forgeboot-webflux/.gitattributes | 3 -- forgeboot-webflux/.gitignore | 40 --------------- forgeboot-webflux/build.gradle.kts | 8 --- settings.gradle.kts | 80 ++++++++++++++++++++++-------- 4 files changed, 59 insertions(+), 72 deletions(-) delete mode 100644 forgeboot-webflux/.gitattributes delete mode 100644 forgeboot-webflux/.gitignore delete mode 100644 forgeboot-webflux/build.gradle.kts diff --git a/forgeboot-webflux/.gitattributes b/forgeboot-webflux/.gitattributes deleted file mode 100644 index 8af972c..0000000 --- a/forgeboot-webflux/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -/gradlew text eol=lf -*.bat text eol=crlf -*.jar binary diff --git a/forgeboot-webflux/.gitignore b/forgeboot-webflux/.gitignore deleted file mode 100644 index 5a979af..0000000 --- a/forgeboot-webflux/.gitignore +++ /dev/null @@ -1,40 +0,0 @@ -HELP.md -.gradle -build/ -!gradle/wrapper/gradle-wrapper.jar -!**/src/main/**/build/ -!**/src/test/**/build/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache -bin/ -!**/src/main/**/bin/ -!**/src/test/**/bin/ - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr -out/ -!**/src/main/**/out/ -!**/src/test/**/out/ - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ - -### VS Code ### -.vscode/ - -### Kotlin ### -.kotlin diff --git a/forgeboot-webflux/build.gradle.kts b/forgeboot-webflux/build.gradle.kts deleted file mode 100644 index a51e0e0..0000000 --- a/forgeboot-webflux/build.gradle.kts +++ /dev/null @@ -1,8 +0,0 @@ -extra { - // 标记为根项目 - setProperty(ProjectFlags.IS_ROOT_MODULE, true) -} - -dependencies { - -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 7273c48..0547e59 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,41 +1,73 @@ -// The settings file is the entry point of every Gradle build. -// Its primary purpose is to define the subprojects. -// It is also used for some aspects of project-wide configuration, like managing plugins, dependencies, etc. -// https://docs.gradle.org/current/userguide/settings_file_basics.html +/** + * This settings.gradle.kts file configures the Gradle build for the forgeboot project. + * It sets up dependency resolution, plugins, and includes all relevant subprojects. + */ + +// Configures the dependency resolution management across all subprojects dependencyResolutionManagement { - // Use Maven Central as the default repository (where Gradle will download dependencies) in all subprojects. + /** + * Use Maven Central as the default repository (where Gradle will download dependencies) + * The @Suppress annotation is used to bypass warnings about unstable API usage. + */ @Suppress("UnstableApiUsage") repositories { mavenCentral() } } +// Applies necessary plugins for the build process plugins { - // Use the Foojay Toolchains plugin to automatically download JDKs required by subprojects. + /** + * Use the Foojay Toolchains plugin to automatically download JDKs required by subprojects. + * This ensures consistent Java versions across different environments. + */ id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" } -// Include the `app` and `utils` subprojects in the build. -// If there are changes in only one of the projects, Gradle will rebuild only the one that has changed. -// Learn more about structuring projects with Gradle - https://docs.gradle.org/8.7/userguide/multi_project_builds.html - - +// Sets the root project name rootProject.name = "forgeboot" + +//region module context +/** + * Includes and configures projects related to 'forgeboot-context' + * This module appears to be focused on contextual functionality within the application. + */ +include( + "forgeboot-context", + ":forgeboot-context:forgeboot-context-api", + ":forgeboot-context:forgeboot-context-impl", + ":forgeboot-context:forgeboot-context-autoconfigure", +) +project(":forgeboot-context").name = "forgeboot-context-spring-boot-starter" +project(":forgeboot-context:forgeboot-context-api").name = "forgeboot-context-api" +project(":forgeboot-context:forgeboot-context-impl").name = "forgeboot-context-impl" +project(":forgeboot-context:forgeboot-context-autoconfigure").name = "forgeboot-context-autoconfigure" +//endregion + //region module banner +/** + * Includes and configures projects related to 'forgeboot-banner' + * This module likely deals with banners or startup messages in the application. + */ include( "forgeboot-banner", ":forgeboot-banner:forgeboot-banner-api", ":forgeboot-banner:forgeboot-banner-impl", ":forgeboot-banner:forgeboot-banner-launcher", ) - project(":forgeboot-banner").name = "forgeboot-banner" - project(":forgeboot-banner:forgeboot-banner-api").name = "forgeboot-banner-api" - project(":forgeboot-banner:forgeboot-banner-impl").name = "forgeboot-banner-impl" - project(":forgeboot-banner:forgeboot-banner-launcher").name = "forgeboot-banner-launcher" +project(":forgeboot-banner").name = "forgeboot-banner" +project(":forgeboot-banner:forgeboot-banner-api").name = "forgeboot-banner-api" +project(":forgeboot-banner:forgeboot-banner-impl").name = "forgeboot-banner-impl" +project(":forgeboot-banner:forgeboot-banner-launcher").name = "forgeboot-banner-launcher" //endregion //region module webmvc +/** + * Includes and configures projects related to 'forgeboot-webmvc' + * This module seems to handle Spring WebMVC-related functionalities like logging, + * exceptions, DTO handling, validation, etc. + */ include( "forgeboot-webmvc", ":forgeboot-webmvc:version", @@ -57,6 +89,10 @@ project(":forgeboot-webmvc:spec").name = "forgeboot-webmvc-spec" //endregion //region module core +/** + * Includes and configures projects related to 'forgeboot-core' + * This module represents foundational components of the application. + */ include( "forgeboot-core", ":forgeboot-core:forgeboot-core-extension" @@ -66,6 +102,10 @@ project(":forgeboot-core:forgeboot-core-extension").name = "forgeboot-core-exten //endregion //region module i18n +/** + * Includes and configures projects related to 'forgeboot-i18n' + * This module handles internationalization (i18n) support. + */ include( "forgeboot-i18n", ":forgeboot-i18n:forgeboot-i18n-api", @@ -78,14 +118,12 @@ 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" -//endregion //region module trace +/** + * Includes and configures projects related to 'forgeboot-trace' + * This module handles distributed tracing functionality. + */ include( "forgeboot-trace", ":forgeboot-trace:forgeboot-trace-api",