Skip to content

Create nullaway-bom project (#1130)#1380

Merged
msridhar merged 3 commits intouber:masterfrom
lpireyn:issue/1130
Dec 19, 2025
Merged

Create nullaway-bom project (#1130)#1380
msridhar merged 3 commits intouber:masterfrom
lpireyn:issue/1130

Conversation

@lpireyn
Copy link
Copy Markdown
Contributor

@lpireyn lpireyn commented Dec 18, 2025

I created the nullaway-bom project that publishes a BOM for the NullAway artifacts published on Maven Central.

There are no tests for this, but the POM file can be generated for visual inspection with:

./gradlew :nullaway-bom:generatePomFileForMavenPublication

This should solve #1130.

Summary by CodeRabbit

  • Chores
    • Added a new Bill of Materials (BOM) module to provide standardized version constraints for core components, simplifying dependency management when using multiple related packages.
    • Adjusted build configuration to skip the code-formatting tool for an additional subproject, reducing unnecessary formatting runs during builds.

✏️ Tip: You can customize this high-level summary in your review settings.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 18, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

Adds a new Gradle Java Platform BOM module named nullaway-bom and includes it in settings.gradle (include ':nullaway-bom'). Creates nullaway-bom/build.gradle applying the java-platform and maven-publish plugins, setting a BOM description, and defining an api constraint selection that includes only specific subprojects (paths :nullaway, :annotations, or paths containing :jar-infer- or :android-jarinfer-models-) while excluding other subprojects. Updates the top-level build.gradle to skip Spotless formatting for the nullaway-bom project.

Suggested reviewers

  • yuxincs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Create nullaway-bom project (#1130)' accurately and concisely describes the main change: creating a new BOM module that publishes Bill of Materials for NullAway artifacts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 03833a5 and dba04ae.

📒 Files selected for processing (3)
  • build.gradle (1 hunks)
  • nullaway-bom/build.gradle (1 hunks)
  • settings.gradle (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-25T22:43:06.446Z
Learnt from: CR
Repo: uber/NullAway PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:43:06.446Z
Learning: Run only the tests for the main NullAway module using `./gradlew :nullaway:test` unless specifically asked to run tests in a different module

Applied to files:

  • nullaway-bom/build.gradle
  • settings.gradle
📚 Learning: 2025-08-14T18:50:06.159Z
Learnt from: msridhar
Repo: uber/NullAway PR: 1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.

Applied to files:

  • nullaway-bom/build.gradle
  • settings.gradle
🔇 Additional comments (3)
build.gradle (1)

126-126: LGTM! Spotless exclusion correctly applied.

The exclusion of nullaway-bom from Spotless formatting is appropriate since the BOM module uses java-platform plugin and contains no Java source files to format.

Note: The comment at lines 124-125 might be slightly misleading since nullaway-bom does have a build.gradle file; the real reason for exclusion is the absence of Java source files.

settings.gradle (1)

16-16: LGTM! Module inclusion is correct.

The new nullaway-bom module is properly included in the build configuration.

nullaway-bom/build.gradle (1)

17-22: Plugin configuration looks correct for a BOM module.

The java-platform plugin is the appropriate choice for a Bill of Materials, and the com.vanniktech.maven.publish plugin aligns with the project's existing publishing infrastructure.

Assumption: The maven-publish plugin configuration (group, version, publishing repositories) is inherited from root project configuration or configured elsewhere.

@msridhar msridhar self-requested a review December 18, 2025 22:17
@msridhar msridhar self-assigned this Dec 18, 2025
Copy link
Copy Markdown
Collaborator

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution! This all LGTM but since I have no experience with BOMs it's hard for me to tell if this is doing exactly the right thing. I'm attaching the pom.default.xml generated when running ./gradlew :nullaway-bom:generatePomFileForMavenPublication. I can confirm it lists all the published artifacts for NullAway. Does it otherwise look good? @scordio @hazendaz any way you could take a quick look?

pom-default.xml

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dba04ae and 65fc72b.

📒 Files selected for processing (1)
  • nullaway-bom/build.gradle (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-14T18:50:06.159Z
Learnt from: msridhar
Repo: uber/NullAway PR: 1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.

Applied to files:

  • nullaway-bom/build.gradle
📚 Learning: 2025-11-25T22:43:06.446Z
Learnt from: CR
Repo: uber/NullAway PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:43:06.446Z
Learning: Run only the tests for the main NullAway module using `./gradlew :nullaway:test` unless specifically asked to run tests in a different module

Applied to files:

  • nullaway-bom/build.gradle
🔇 Additional comments (2)
nullaway-bom/build.gradle (2)

17-20: LGTM!

The plugin configuration is correct for a BOM module. The java-platform plugin properly configures the module as a BOM, and com.vanniktech.maven.publish is consistent with other published modules in the project.


22-22: LGTM!

The description is clear and follows standard BOM naming conventions.

@scordio
Copy link
Copy Markdown
Contributor

scordio commented Dec 19, 2025

LGTM 👍 structurally similar to what we publish for AssertJ.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.47%. Comparing base (824353e) to head (40b83ce).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1380   +/-   ##
=========================================
  Coverage     88.47%   88.47%           
  Complexity     2626     2626           
=========================================
  Files            97       97           
  Lines          8822     8822           
  Branches       1762     1762           
=========================================
  Hits           7805     7805           
  Misses          509      509           
  Partials        508      508           

☔ View full report in Codecov by Sentry.
📢 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.

@lpireyn
Copy link
Copy Markdown
Contributor Author

lpireyn commented Dec 19, 2025

The failing check doesn't seem related to the changes in this PR 🤔

Copy link
Copy Markdown
Collaborator

@msridhar msridhar left a comment

Choose a reason for hiding this comment

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

Thanks again!

@msridhar msridhar enabled auto-merge (squash) December 19, 2025 00:33
@msridhar
Copy link
Copy Markdown
Collaborator

The failing check doesn't seem related to the changes in this PR 🤔

Yeah sorry about that, that's a non-blocking integration test that for now is expected to fail

@msridhar msridhar merged commit 3f15e12 into uber:master Dec 19, 2025
10 of 11 checks passed
@lpireyn lpireyn deleted the issue/1130 branch December 19, 2025 00:43
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.

4 participants