Skip to content

Conversation

@AlexeyKuznetsov-DD
Copy link
Contributor

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Dec 3, 2025

What Does This Do

  • Replaces the monolithic groovy-all dependency with individual groovy-* modules.
  • Refactored Groovy and Spock dependencies so they are used only within the test scope.

Motivation

Using the bundled groovy-all artifact introduces a large set of transitive dependencies into the classpath, many of which are unnecessary. Splitting it into specific groovy-* modules helps reduce classpath footprint and improves build hygiene.

Additionally, several modules previously declared Groovy and Spock as api dependencies, even when they were only required for testing. This PR corrects that by limiting their usage to the appropriate scope.

Additional Notes

Approximately 95% of modules already use Groovy and Spock via testImplementation. The remaining modules have been adjusted manually to prevent unneeded classpath pollution.

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Dec 3, 2025
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Dec 3, 2025
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD marked this pull request as ready for review December 3, 2025 15:17
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD requested review from a team as code owners December 3, 2025 15:17
addTestSuiteForDir('latestDepTest', 'test')

dependencies {
testImplementation(libs.javaparser)
Copy link
Contributor

Choose a reason for hiding this comment

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

just wondering -- do you know why this previously didn't need to be included?

I see that you also included libs.javaparser with your changes in gradle/libs.versions.toml, but if I understand correctly, this library wasn't a part of groovy-all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually it is from groovy-all:
./gradlew :dd-java-agent:instrumentation:java:java-lang:java-lang-15.0:dependencies
Part of the tree:

 org.codehaus.groovy:groovy-all:3.0.24
|    +--- org.codehaus.groovy:groovy-groovydoc:3.0.24
|    |    +--- org.codehaus.groovy:groovy:3.0.24
|    |    \--- com.github.javaparser:javaparser-core:3.25.6

And there usage in tests:
import com.github.javaparser.utils.StringEscapeUtils

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR make that obvious, that we NEVER used groovydoc, but its transitive dependency :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ohhh cool okay, thanks!

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

Labels

comp: tooling Build & Tooling tag: no release notes Changes to exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants