Refactor persist-tools to extract core Java APIs into separate module#428
Merged
TharmiganK merged 5 commits intomainfrom Nov 27, 2025
Merged
Refactor persist-tools to extract core Java APIs into separate module#428TharmiganK merged 5 commits intomainfrom
TharmiganK merged 5 commits intomainfrom
Conversation
Create new `persist-core` gradle subproject containing reusable Java APIs that were previously tightly coupled to the CLI tool. This enables direct usage of core persistence functionality in other Java packages without depending on the CLI. Changes: - Add `persist-core` gradle subproject with Java library configuration - Move core packages from `persist-cli` to `persist-core`: * configuration, introspect, nodegenerator (all subpackages) * inflector, utils, models, components, introspectiondto * BalException.java, PersistToolsConstants.java - Create JPMS module definition for `persist-core` - Extract shared file utilities into FileUtils class - Update `persist-cli` to depend on `persist-core` - Update `persist-cli-tests` to include both modules - Configure GitHub Packages publication for `persist-core` - Preserve all gradle build functionality and test execution This architectural change maintains backward compatibility while providing a cleaner separation of concerns between the CLI interface and core persistence logic.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #428 +/- ##
============================================
- Coverage 86.21% 86.10% -0.11%
- Complexity 0 1269 +1269
============================================
Files 66 67 +1
Lines 6543 6529 -14
Branches 874 872 -2
============================================
- Hits 5641 5622 -19
Misses 651 651
- Partials 251 256 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
daneshk
reviewed
Nov 25, 2025
persist-core/src/main/java/io/ballerina/persist/utils/FileUtils.java
Outdated
Show resolved
Hide resolved
daneshk
reviewed
Nov 25, 2025
daneshk
reviewed
Nov 25, 2025
daneshk
previously approved these changes
Nov 25, 2025
Co-authored-by: Danesh Kuruppu <daneshk@users.noreply.github.com>
# Conflicts: # persist-cli/src/main/java/io/ballerina/persist/cmd/Utils.java # persist-core/src/main/java/io/ballerina/persist/utils/BalProjectUtils.java
|
daneshk
approved these changes
Nov 27, 2025
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.


Purpose
Create new
persist-coregradle subproject containing reusable Java APIs that were previously tightly coupled to the CLI tool. This enables direct usage of core persistence functionality in other Java packages without depending on the CLI.Fixes: ballerina-platform/ballerina-library#8471
Examples
N/A
Checklist
Updated the specificationUpdated the changelogAdded tests