feat(EM-32): Extract and version ftgo-common shared library#43
Open
devin-ai-integration[bot] wants to merge 1 commit intofeat/microservices-migration-v2from
Open
Conversation
- Copy all source files from ftgo-common/ to libs/ftgo-common/ - Migrate package from net.chrisrichardson.ftgo.common to com.ftgo.common - Update JPA annotations from javax.persistence to jakarta.persistence - Update javax.annotation to jakarta.annotation - Replace commons-lang with java.util.Objects for equals/hashCode - Update build.gradle with Java 17, Spring Boot 3.2, Jakarta Persistence 3.1 - Add settings.gradle for independent buildability - Add unit tests for Money, PersonName, Address, UnsupportedStateTransitionException - Add MoneySerializationTest for Jackson serialization/deserialization - Add README documenting library API and usage 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-32): Extract and version ftgo-common shared library
Summary
Extracts the monolith's
ftgo-commonmodule intolibs/ftgo-common/as a standalone, versioned shared library targeting Java 17 / Spring Boot 3.2 / Jakarta namespace.What changed:
ftgo-common/src/intolibs/ftgo-common/src/under the newcom.ftgo.commonpackagejavax.persistence→jakarta.persistenceandjavax.annotation→jakarta.annotationcommons-langEqualsBuilder/HashCodeBuilder/ToStringBuilderinMoney.javawithjava.util.Objectsbuild.gradlewith explicit dependencies (Jakarta Persistence 3.1, Jackson 2.15, Spring Boot 3.2, JUnit 5)settings.gradleso the library can build independently (gradle buildfromlibs/ftgo-common/)Money,Address,PersonName,UnsupportedStateTransitionException, andMoneyModuleserializationREADME.mddocumenting the library APINo monolith source files or root
settings.gradlewere modified.Review & Testing Checklist for Human
Money.equals()usesBigDecimal.equals()which is scale-sensitive (new BigDecimal("10.0") ≠ new BigDecimal("10")). This matches the original behavior but could be a latent bug for consumers—confirm this is acceptable or considercompareTo == 0.MoneyModuleuses deprecatedctxt.mappingException()(Jackson 2.15 deprecation warning emitted during build). Verify this is acceptable or should be replaced withctxt.handleUnexpectedToken().settings.gradlecoexistence: A standalonesettings.gradlewas added for independent buildability. When this module is eventually wired into the root Gradle build, confirm this won't conflict—may need to be removed or conditioned at that point.AddressandPersonNamelackequals/hashCode: Same as the original monolith, but as JPA embeddables/value objects this is a gap worth considering.cd libs/ftgo-common && gradle buildwith JDK 17+ to verify compilation and all 19 tests pass. Spot-check that no monolith files underftgo-common/were modified.Notes
Money.ZEROis notfinal—carried over from the original sourcebuild.gradle; a version catalog can be introduced in a follow-up when the root build is modernizedLink to Devin run: https://app.devin.ai/sessions/55ac098d3ebb428a9632461a5597df0d
Requested by: @abj453demo