Skip to content

fix(build.gradle.kts): add test source directory for annotation#321

Merged
pratyush618 merged 1 commit into
masterfrom
fix/java-ide-generated-sources
Jun 28, 2026
Merged

fix(build.gradle.kts): add test source directory for annotation#321
pratyush618 merged 1 commit into
masterfrom
fix/java-ide-generated-sources

Conversation

@pratyush618

@pratyush618 pratyush618 commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

…ssor generated sources

Summary by CodeRabbit

  • Tests
    • Improved test setup so generated Java test sources are included automatically during builds.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@pratyush618, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 12 minutes and 12 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 46f12414-35c9-49fa-b9f7-809ec74084fc

📥 Commits

Reviewing files that changed from the base of the PR and between 14d5d01 and 3ae5f38.

📒 Files selected for processing (1)
  • sdks/java/build.gradle.kts
📝 Walkthrough

Walkthrough

The Gradle build script for the Java SDK registers the annotation-processor-generated test Java sources directory (build/generated/sources/annotationProcessor/java/test) as an additional source directory in sourceSets["test"].java.

Changes

Java SDK Build Script

Layer / File(s) Summary
Register generated test sources
sdks/java/build.gradle.kts
Adds the annotation-processor-generated test Java directory to sourceSets["test"].java.srcDir(...) so those files are compiled with the test sources.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A path was missing, the processor's art,
Hidden in build dirs, apart from the start.
Four lines I hopped in, srcDir set right,
Now generated tests compile with delight!
Carrots for all — the build shines bright! 🥕

🚥 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 reflects the main change: adding a test source directory in build.gradle.kts for annotation-generated sources.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/java-ide-generated-sources

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

@pratyush618 pratyush618 changed the title fix(build.gradle.kts): add test source directory for annotation proce… fix(build.gradle.kts): add test source directory for annotation Jun 28, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
sdks/java/build.gradle.kts (1)

81-83: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Remove the generated test sources directory from sourceSets["test"].
testAnnotationProcessor already makes this output available to compileTestJava; keeping it in the test source set is redundant and can interfere with incremental builds/IDE import. If IDE visibility is the goal, mark it as a generated source root instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@sdks/java/build.gradle.kts` around lines 81 - 83, Remove the generated test
sources directory from sourceSets["test"] in build.gradle.kts, since
testAnnotationProcessor already exposes it to compileTestJava and this extra
srcDir is redundant. Update the test source configuration around
sourceSets["test"] so the generated path is no longer added there; if IDE
recognition is needed, register that directory as a generated source root
instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@sdks/java/build.gradle.kts`:
- Around line 81-83: Remove the generated test sources directory from
sourceSets["test"] in build.gradle.kts, since testAnnotationProcessor already
exposes it to compileTestJava and this extra srcDir is redundant. Update the
test source configuration around sourceSets["test"] so the generated path is no
longer added there; if IDE recognition is needed, register that directory as a
generated source root instead.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c7ee9fd1-9b04-4c4b-8ac9-76e115bededa

📥 Commits

Reviewing files that changed from the base of the PR and between 3434381 and 14d5d01.

📒 Files selected for processing (1)
  • sdks/java/build.gradle.kts

@pratyush618
pratyush618 force-pushed the fix/java-ide-generated-sources branch from 14d5d01 to 3ae5f38 Compare June 28, 2026 07:36
@pratyush618
pratyush618 merged commit 19ae2e4 into master Jun 28, 2026
18 checks passed
@pratyush618
pratyush618 deleted the fix/java-ide-generated-sources branch June 28, 2026 07:51
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.

1 participant