feat(EM-28): Shared Parent Gradle Configuration for Microservices#44
Open
devin-ai-integration[bot] wants to merge 1 commit intofeat/microservices-migration-v2from
Open
Conversation
… for microservices - Create gradle/libs.versions.toml with centralized dependency versions (Spring Boot 3.2.5, Java 17, JUnit 5.10.2, Micrometer 1.12.5, etc.) - Create build-logic/ composite build with convention plugins: - ftgo.java-conventions: Java 17 toolchain, UTF-8, compiler args - ftgo.spring-boot-conventions: Spring Boot 3.x + dependency management - ftgo.testing-conventions: JUnit 5, Rest-Assured 5.4, Mockito, integration tests - ftgo.docker-conventions: Jib-based container builds with Temurin 17 - ftgo.publishing-conventions: Maven publishing with sources/javadoc - Update template service build.gradle to use convention plugins (<18 lines) - Add build-logic README with usage documentation and examples Co-Authored-By: Alex Baker <alexandercommander453@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(EM-28): Add shared Gradle convention plugins and version catalog
Summary
Introduces a
build-logic/composite build with Gradle convention plugins and agradle/libs.versions.tomlversion catalog to standardize build configuration for the new microservices. This targets Java 17 + Spring Boot 3.2.5 for new services while leaving the existing monolith build (Gradle 4.10.2 / Java 8) untouched.New files:
gradle/libs.versions.toml— Centralized version catalog (Spring Boot 3.2.5, JUnit 5.10.2, Micrometer 1.12.5, Rest-Assured 5.4.0, Flyway 10.11.0, Jackson 2.17.0, Testcontainers 1.19.7, etc.)build-logic/— Kotlin DSL precompiled script plugins:ftgo.java-conventions— Java 17 toolchain, UTF-8, compiler flags, groupftgo.spring-boot-conventions— Spring Boot plugin + BOM + bootJar configftgo.testing-conventions— JUnit 5, Mockito, AssertJ, Rest-Assured, integration test taskftgo.docker-conventions— Jib-based container image builds (Temurin 17 base)ftgo.publishing-conventions— Maven publishing with sources/javadoc JARsbuild-logic/README.md— Documentation with consumption instructions and examplesModified:
services/_template-service/build.gradle— Refactored to use convention plugins (18 lines, down from 21)The
build-logic/project compiles successfully with Gradle 8.7 + Java 17.Review & Testing Checklist for Human
settings.gradlewiring exists yet. The README documents how to consume (pluginManagement { includeBuild(...) }), but no actualsettings.gradle(.kts)was created underservices/to wire thebuild-logicincludeBuild. Verify this is acceptable as a follow-up or needs to be added now."org.springframework.boot:spring-boot-starter-test"without a version). These resolve only if the Spring Boot BOM is present — meaningftgo.testing-conventionssilently depends onftgo.spring-boot-conventionsalso being applied. Confirm this coupling is intended or if the plugin should use version catalog accessors instead.ImageFormat.OCIline was removed during compilation (Jib Gradle plugin API doesn't expose it the same way). The README still claims "OCI image format" but the plugin defaults to Docker format. Verify if this matters.project(':libs:...')dependencies. The original template hadimplementation project(':libs:ftgo-common')andproject(':libs:ftgo-domain'). These were removed in the refactor. Confirm this is correct for the template or if inter-project dependencies should be preserved.testsource set with@Tag("integration")instead of a separateintegrationTestsource set (like the monolith'sIntegrationTestsPlugin.groovy). Verify this approach is acceptable.Test Plan
services/with asettings.gradle.ktsthat includespluginManagement { includeBuild("../../build-logic") }anddependencyResolutionManagement { versionCatalogs { create("libs") { from(files("../../gradle/libs.versions.toml")) } } }ftgo.spring-boot-conventions,ftgo.testing-conventions,ftgo.docker-conventionsin the service'sbuild.gradle./gradlew :services:<service>:buildto verify compilation./gradlew :services:<service>:jibDockerBuildto verify Docker image creationbuild.gradleis < 30 lines and uses only catalog accessorsNotes
build-logic/project requires Java 17 to compile (set viajava.toolchaininbuild.gradle.kts)com.mysql:mysql-connector-jinstead ofmysql:mysql-connector-java)