Skip to content

Check excluding stdlib entries in KotlinPluginsTest#1371

Merged
Goooler merged 1 commit intomainfrom
g/20250325/check-std-libs
Mar 25, 2025
Merged

Check excluding stdlib entries in KotlinPluginsTest#1371
Goooler merged 1 commit intomainfrom
g/20250325/check-std-libs

Conversation

@Goooler
Copy link
Member

@Goooler Goooler commented Mar 25, 2025

Follow up #1339.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces a new test parameter excludeStdlib to check the behavior of the shadow plugin when the Kotlin standard library is excluded. This is a valuable addition to ensure the plugin functions correctly under different configurations. The changes look good overall, but there are a few areas that could be improved for clarity and maintainability.

Summary of Findings

  • Test clarity with containsOnly: The use of containsOnly when excludeStdlib is true provides a clear and strict assertion about the contents of the shadow JAR. This is a good approach for verifying the exclusion of the standard library.
  • Duplication in test setup: The stdlib variable and writeGradleProperties() call are duplicated in both test methods. Consider extracting this logic into a shared function to reduce redundancy.

Merge Readiness

The changes are well-structured and the addition of the excludeStdlib parameter enhances the test coverage. However, addressing the duplication in test setup would improve the code's maintainability. I recommend addressing the duplication issue before merging. I am unable to approve this pull request, and recommend that others review and approve this code before merging.

@Goooler Goooler force-pushed the g/20250325/check-std-libs branch from cf6339d to 3423db8 Compare March 25, 2025 14:41
@Goooler Goooler requested a review from Copilot March 25, 2025 14:42
Copy link
Contributor

Copilot AI left a comment

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.

Files not reviewed (1)
  • src/functionalTest/kotlin/com/github/jengelman/gradle/plugins/shadow/KotlinPluginsTest.kt: Language not supported

@Goooler
Copy link
Member Author

Goooler commented Mar 25, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces a new test parameter excludeStdlib to check the behavior of the shadow plugin when the Kotlin standard library is excluded. This is a valuable addition to ensure the plugin correctly handles different dependency configurations. The implementation is generally well-structured and the tests cover both cases (with and without stdlib).

Merge Readiness

The code changes are well-structured and the tests cover both cases (with and without stdlib). I would recommend merging this pull request.

@Goooler Goooler enabled auto-merge (squash) March 25, 2025 14:45
@Goooler Goooler merged commit 777afed into main Mar 25, 2025
7 checks passed
@Goooler Goooler deleted the g/20250325/check-std-libs branch March 25, 2025 14:49
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.

2 participants