Skip to content

Conversation

@bric3
Copy link
Contributor

@bric3 bric3 commented Oct 31, 2025

What Does This Do

Refactor the mechanism that relied on extra properties like minJavaVersionForTests to a Gradle extension mechanism.

Also, minJavaVersionForTests was serving two distinct purpose

  • Restricting the range JDK on which the test can run
  • Adding and configuring a source set

This PR explicitly segregates these two concerns.

Motivation

The way the extra properties were programmed prevents to remove some project.afterEvaluate calls. And also prevents to migrate to convention plugins (these are ultimately pre-compiled script plugins).

Additional Notes

At this time the logic remains very similar, and focuses on the refactoring from extra properties (ext { }) to extensions to avoid too many change.

However, in the future it might be interesting to revisit the way the JDK is specified, from JavaVersion to something more toolchain aware via org.gradle.jvm.toolchain.JavaToolchainSpec.

Some projects still rely on regular Gradle directives to set the sourceset. These will be migrate in a follow-up PR :

  • dd-java-agent/agent-bootstrap/build.gradle
  • dd-java-agent/agent-builder/build.gradle
  • dd-java-agent/build.gradle
  • dd-java-agent/instrumentation/mule-4.5/build.gradle
  • dd-java-agent/instrumentation/play/play-2.4/build.gradle
  • dd-java-agent/instrumentation/play/play-2.6/build.gradle

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@github-actions
Copy link
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

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