refactor(deps): optimize dependency footprints, and add lazy initialization with platform-specific JPDFium bundling - #7620
refactor(deps): optimize dependency footprints, and add lazy initialization with platform-specific JPDFium bundling#7620balazs-szucs wants to merge 8 commits into
Conversation
…zation with platform-specific JPDFium bundling
Changed sanitizeStructure from true to false in RedactController.
Added a comment indicating that the sanitizeStructure option is experimental and should not be enabled.
There was a problem hiding this comment.
Pull request overview
This PR refactors Gradle dependency wiring to reduce runtime footprint (dependency exclusions, slimmer packaging) and introduces optional Spring lazy-initialization for lower dev-mode memory usage, alongside a JPDFium upgrade and expanded redaction option flags.
Changes:
- Bump JPDFium version and expand/auto-select native platform bundling logic.
- Reduce dependency/JAR size via targeted transitive excludes and excluding
.mapsourcemaps from the boot JAR. - Add an opt-in
-PlazyInit=truebootRun flag to enable Spring lazy initialization.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| build.gradle | Bumps jpdfiumVersion, removes direct pixee toolkit dependency from all subprojects, adds opt-in lazy-init JVM arg for bootRun. |
| app/core/src/main/java/stirling/software/SPDF/controller/api/security/TextRedactionService.java | Adds additional RedactOptions flags for improved text handling (ligatures/BiDi/graphemes). |
| app/core/src/main/java/stirling/software/SPDF/controller/api/security/RedactController.java | Mirrors new RedactOptions flags for API redaction behavior. |
| app/core/build.gradle | Tightens transitive dependencies (OpenCSV/POI exclusions) and excludes .map files from the boot JAR. |
| app/common/build.gradle | Moves pixee toolkit to common as an api dependency and adds/changes JPDFium native-platform bundling logic. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
✅ Backend License Check PassedAll backend dependencies have valid and allowed licenses. The backend license report has been updated successfully. |
|
This adds windows arm support of JPDFium. However, i have not checked if there is infra to build and publish. E.g., with this theoretically we could make desktop for windows but not sure that we have CI for that. This is to say, i am not quite certain how the CI works there may be as easy as adding windows arm to the matrix, but after this worthwhile to look into. See this ticket: #7140 |
🚀 V2 Auto-Deployment Complete!🔗 Direct Test URL (non-SSL) http://54.175.155.236:7620 🧩 Admin portal included - try it at http://54.175.155.236:7620/portal. This deployment will be automatically cleaned up when the PR is closed. 🔄 Auto-deployed for approved V2 contributors. |
Description of Changes
Bumps, removes deps. Tested with desktop/web. All OK.
Checklist
General
Documentation
Translations (if applicable)
scripts/counter_translation.pyUI Changes (if applicable)
Testing (if applicable)
task checkto verify linters, typechecks, and tests pass