Skip to content

fix: promote Jackson dependencies to api scope in published POM#350

Open
curfew-marathon wants to merge 1 commit into
mainfrom
fix/jackson-api-scope
Open

fix: promote Jackson dependencies to api scope in published POM#350
curfew-marathon wants to merge 1 commit into
mainfrom
fix/jackson-api-scope

Conversation

@curfew-marathon

@curfew-marathon curfew-marathon commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switches the Gradle plugin from java to java-library to enable the api dependency configuration
  • Promotes jackson-core, jackson-annotations, and jackson-databind from implementation to api so they appear as compile scope in the published Maven POM
  • jackson-datatype-jsr310 and jackson-databind-nullable remain implementation as they don't appear in the public API surface

Why

These Jackson types are used in public model class annotations and ApiClient imports. Declaring them as implementation maps to runtime scope in Maven, meaning downstream Maven consumers don't have them on their compile classpath — causing unknown enum constant compiler warnings.

Fixes #349

Summary by CodeRabbit

  • Chores
    • Updated dependency configuration to expose Jackson libraries as part of the public API.

Jackson core, annotations, and databind are used in the public API
surface (model class annotations, ApiClient imports), so they must be
declared as `api` rather than `implementation`. This ensures downstream
Maven consumers have them on the compile classpath and avoids
"unknown enum constant" compiler warnings.

Switches the Gradle plugin from `java` to `java-library` to enable
the `api` configuration.

Fixes #349
Copilot AI review requested due to automatic review settings June 8, 2026 16:59
@curfew-marathon curfew-marathon requested a review from a team as a code owner June 8, 2026 16:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06cb7355-6c45-4ce4-968c-5670991324cb

📥 Commits

Reviewing files that changed from the base of the PR and between 8d9a699 and 1deb975.

📒 Files selected for processing (1)
  • build.gradle

Walkthrough

The build file switches the Java plugin from java to java-library, then re-exports Jackson dependencies via api instead of implementation. This exposes Jackson as a transitive dependency for downstream consumers, resolving compiler warnings when libraries depend on the SDK without explicitly declaring Jackson.

Changes

Jackson API Export Configuration

Layer / File(s) Summary
Export Jackson as API dependency
build.gradle
Plugin changed from java to java-library to enable api configuration. Jackson BOM and modules (jackson-core, jackson-annotations, jackson-databind) declared as api instead of implementation to expose them transitively to consumers that reference Jackson types in the SDK's public API.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • openfga/java-sdk#231: Modifies Jackson dependency declarations in build.gradle, including BOM-related changes that build on the dependency scoping model updated in this PR.

Suggested reviewers

  • rhamzeh
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: promoting Jackson dependencies from implementation to api scope in the published POM.
Linked Issues check ✅ Passed The pull request directly addresses issue #349 by promoting Jackson core libraries (jackson-core, jackson-annotations, jackson-databind) to api scope, resolving compiler warnings for downstream consumers.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the stated objective: promoting Jackson dependencies to api scope in build.gradle, with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/jackson-api-scope

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.48%. Comparing base (8d9a699) to head (1deb975).

❌ Your project status has failed because the head coverage (38.48%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #350      +/-   ##
============================================
+ Coverage     38.47%   38.48%   +0.01%     
- Complexity     1267     1268       +1     
============================================
  Files           198      198              
  Lines          7704     7704              
  Branches        900      900              
============================================
+ Hits           2964     2965       +1     
  Misses         4591     4591              
+ Partials        149      148       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jackson Dependencies Are Not Scoped Correctly

3 participants