chore(deps): bump epub4j and epub4j-native versions to 1.4.0#1090
chore(deps): bump epub4j and epub4j-native versions to 1.4.0#1090balazs-szucs wants to merge 1 commit intogrimmory-tools:developfrom
Conversation
WalkthroughThe pull request enhances native library classifier selection in the Gradle build configuration. It refactors ChangesNative Library Classifier Selection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@backend/build.gradle.kts`:
- Around line 97-145: The platform/arch and libc-detection logic is duplicated
between epub4jNativesClassifier() and pdfiumNativesClassifier(); extract two
private helper functions (e.g., resolveTargetPlatformAndArch(project):
Pair<String?,String?> and detectMuslLibc(project, targetPlatform, targetArch):
String /*returns "linux" or "linux-musl"*/ ) that encapsulate: (1) resolving
TARGETPLATFORM/TARGETARCH from env or project properties and computing osName
and arch, and (2) resolving TARGETLIBC/project targetLibc, checking /lib for
ld-musl-*, and fallback /proc/self/maps check; then replace the duplicated
blocks in epub4jNativesClassifier() and pdfiumNativesClassifier() to call these
helpers and keep the existing osKey/archKey mapping and error behavior
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: d0ad3071-5699-467b-802d-1e3cdcd4bbfe
📒 Files selected for processing (1)
backend/build.gradle.kts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Test Suite / Backend Tests
- GitHub Check: Test Suite / Frontend Tests
- GitHub Check: Frontend Lint Threshold Check
- GitHub Check: Analyze (java-kotlin)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (1)
**/*
⚙️ CodeRabbit configuration file
**/*: This project is being developed using current and future-facing technologies:
- Java 25 with --enable-preview (preview features are INTENTIONAL and encouraged)
- Spring Boot 4 (latest major version, check APIs accordingly)
- Jackson 3 (new package: tools.jackson.* instead of com.fasterxml.jackson.*)
- Hibernate 7.3.x (Jakarta Persistence 3.2, new APIs; avoid deprecated Hibernate 5/6 patterns)
- Angular 21 (signals-based reactivity, no NgModules unless legacy)
Grimmory Internal Tools
- epub4j and pdfium4j are our own internal tools developed by the Grimmory team.
- Always verify behavior and API changes against the upstream repositories:
- If you encounter issues with these libraries, check if a fix exists in the upstream grimmory-tools organization.
Metadata Standards and Compliance
- For all metadata writing and parsing logic, double-check against Dublin Core and ANSI standards to ensure perfect official compliance.
- We strictly follow the widespread and official XML-compliant methods for EPUB2, EPUB3, CBX, and PDF formats.
General Java and Spring rules
- ALWAYS prefer modern, idiomatic Java 25 constructs over legacy patterns.
- Preview features (--enable-preview) are enabled and intentional; do NOT flag them as risky unless there is a concrete runtime issue.
- Prefer: records, sealed classes/interfaces, pattern matching (switch expressions, instanceof), structured concurrency (StructuredTaskScope), scoped values, string templates, unnamed patterns/variables.
- Prefer virtual threads (Thread.ofVirtual(), Executors.newVirtualThreadPerTaskExecutor()) over platform threads for I/O-bound work.
- Prefer the new Sequenced Collections API (SequencedCollection, SequencedMap) where applicable.
- Prefer
varfor local variables when the type is obvious from context.- Use stream().toList() instead of stream().collect(Collectors.toList()) for imm...
Files:
backend/build.gradle.kts
🧠 Learnings (2)
📚 Learning: 2026-03-31T06:22:25.311Z
Learnt from: imnotjames
Repo: grimmory-tools/grimmory PR: 113
File: booklore-api/build.gradle.kts:89-90
Timestamp: 2026-03-31T06:22:25.311Z
Learning: When reviewing build logic or CI checks that call the JitPack build status API, do not treat a response like {"status":"none"} as evidence that a dependency is unavailable or that a build has failed. JitPack typically builds packages on-demand the first time they’re requested (e.g., via Gradle); "none" means the package isn’t pre-built/cached yet. Only raise a build failure concern when the status explicitly indicates an error/failure (e.g., failed/cancelled), or when dependent resolution actually fails.
Applied to files:
backend/build.gradle.kts
📚 Learning: 2026-04-02T09:12:48.158Z
Learnt from: balazs-szucs
Repo: grimmory-tools/grimmory PR: 334
File: booklore-api/build.gradle.kts:0-0
Timestamp: 2026-04-02T09:12:48.158Z
Learning: In this repo, nightcompress (groupId `com.github.gotson.nightcompress`, artifact `nightcompress`) is the preferred library for archive/unarchive operations (including RAR and other formats). During code review, flag changes to Gradle dependency declarations that remove nightcompress or replace it with an alternative for unarchiving (e.g., junrar, commons-compress, JNI-based libraries, or standard Java `ZipInputStream`/`ZipFile`) unless there’s a justified exception. Exceptions are acceptable only when nightcompress cannot handle a specific archive format; in that case, require the PR to clearly document the format limitation, the alternative being used, and get maintainer confirmation of the trade-off.
Applied to files:
backend/build.gradle.kts
🔇 Additional comments (1)
backend/build.gradle.kts (1)
138-144: The generated classifiers correctly match the expected platform-architecture combinations forepub4j-native:1.4.0. Theepub4jNativesClassifier()function produceslinux-x86_64,linux-aarch64,linux-musl-x86_64,linux-musl-aarch64,macos-x86_64,macos-aarch64, andwindows-x86_64—exactly the classifiers published for the native library. No Gradle dependency resolution issues are expected.
Description
i bumped epub4j, had to manually due to the fact that package signatures changes, previously all native binaries were bundled together, now they are part of their respective packages, hence i needed to adjust this.
Linked Issue
Changes
Manual Testing Steps
Screenshots (Optional)
Additional Context (Optional)
AI Disclosure
Checklist
just ui checkandjust api check.Summary by CodeRabbit