GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Upgrade gradle to v8.14.3 by sarahchen6 · Pull Request #8950 · DataDog/dd-trace-java

Upgrade gradle to v8.14.3 #8950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
sarahchen6 merged 20 commits into master from sarahchen6/upgrade-to-gradle-8.14
Jul 10, 2025

Uh oh!

There was an error while loading. Please reload this page.

Merged

Upgrade gradle to v8.14.3 #8950

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
92d547b
Upgrade gradle to v8.14
sarahchen6 Jun 9, 2025
5bf8b26
Fix checksum
sarahchen6 Jun 9, 2025
8beec7d
Update groovy version
sarahchen6 Jun 9, 2025
7222e50
Update type parameters
sarahchen6 Jun 9, 2025
87c5f33
Upgrade gradle to v8.14.2
sarahchen6 Jun 10, 2025
ac0d862
Address issue with SpecificInstallationToolchainSpec
sarahchen6 Jun 10, 2025
d3d5475
Update JUnit jupiter and platform versions
sarahchen6 Jun 10, 2025
b8948ca
Make PropertyFactory change more readable
sarahchen6 Jun 10, 2025
2086da5
Fix GString to String[] assignment
sarahchen6 Jun 11, 2025
aca0e17
Changed too many things for junit-5.3
sarahchen6 Jun 11, 2025
dc7dd6e
Skip muzzle for gradle 8.3 instrumentation
sarahchen6 Jul 2, 2025
25aa1b4
Upgrade to gradle v8.14.3
sarahchen6 Jul 7, 2025
b65b0da
Fix Gradle 8.3 instrumentation
nikita-tkachenko-datadog Jul 4, 2025
ba50a89
Update gradle wrapper
sarahchen6 Jul 7, 2025
e8bc3d6
Remove log-injection groovy specification
sarahchen6 Jul 7, 2025
7e140f4
Upgrade groovy to 3.0.25
sarahchen6 Jul 7, 2025
1733124
Change groovy version back to 3.0.24 due to incompatibility
sarahchen6 Jul 7, 2025
3d4183e
Upgrade junit to x.12.0
sarahchen6 Jul 9, 2025
7fe6c13
Add comment
sarahchen6 Jul 9, 2025
2c352f5
Retrieve binary gradle file only
sarahchen6 Jul 9, 2025
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

2 changes: 1 addition & 1 deletion 2 .gitlab-ci.yml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ variables:
BUILD_JOB_NAME: "build"
DEPENDENCY_CACHE_POLICY: pull
BUILD_CACHE_POLICY: pull
GRADLE_VERSION: "8.5" # must match gradle-wrapper.properties
GRADLE_VERSION: "8.14.3" # must match gradle-wrapper.properties
MAVEN_REPOSITORY_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/maven-central/"
GRADLE_PLUGIN_PROXY: "http://artifactual.artifactual.all-clusters.local-dc.fabric.dog:8081/repository/gradle-plugin-portal-proxy/"
BUILDER_IMAGE_VERSION_PREFIX: "v25.06-" # use either an empty string (e.g. "") for latest images or a version followed by a hyphen (e.g. "v25.05-")
Expand Down
14 changes: 12 additions & 2 deletions 14 ...n/groovy/datadog/trace/instrumentation/gradle/CiVisibilityGradleListenerInjector_8_3.java
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
package datadog.trace.instrumentation.gradle;

import datadog.trace.util.MethodHandles;
import java.lang.invoke.MethodHandle;
import java.util.Arrays;
import org.gradle.api.Action;
import org.gradle.initialization.ClassLoaderRegistry;
import org.gradle.internal.service.DefaultServiceRegistry;
import org.gradle.internal.service.ServiceRegistration;
import org.gradle.internal.service.ServiceRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CiVisibilityGradleListenerInjector_8_3 {

private static final MethodHandles METHOD_HANDLES =
new MethodHandles(DefaultServiceRegistry.class.getClassLoader());
private static final MethodHandle REGISTER_SERVICE =
METHOD_HANDLES.method(DefaultServiceRegistry.class, "register", Action.class);

private static final Logger LOGGER =
LoggerFactory.getLogger(CiVisibilityGradleListenerInjector_8_3.class);

Expand All @@ -21,8 +30,9 @@ public static void injectCiVisibilityGradleListener(
Class<?> ciVisibilityGradleListener =
CiVisibilityGradleListenerInjector_8_3.loadCiVisibilityGradleListener(
classLoaderRegistry);
buildScopeServices.register(
serviceRegistration -> serviceRegistration.add(ciVisibilityGradleListener));
Action<ServiceRegistration> registrationAction =
serviceRegistration -> serviceRegistration.add(ciVisibilityGradleListener);
METHOD_HANDLES.invoke(REGISTER_SERVICE, buildScopeServices, registrationAction);
} catch (Exception e) {
LOGGER.warn("Could not inject CI Visibility Gradle listener", e);
}
Expand Down
9 changes: 7 additions & 2 deletions 9 ...vy/datadog/trace/instrumentation/gradle/GradleBuildScopeServices_8_3_Instrumentation.java
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import java.util.Set;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.matcher.ElementMatcher;
import org.gradle.internal.service.DefaultServiceRegistry;
import org.gradle.internal.service.ServiceRegistry;
import org.gradle.internal.service.scopes.BuildScopeServices;

@AutoService(InstrumenterModule.class)
public class GradleBuildScopeServices_8_3_Instrumentation extends InstrumenterModule.CiVisibility
Expand Down Expand Up @@ -55,10 +55,15 @@ public void methodAdvice(MethodTransformer transformer) {
public static class Construct {
@Advice.OnMethodExit(suppress = Throwable.class)
public static void afterConstructor(
@Advice.This final BuildScopeServices buildScopeServices,
@Advice.This final DefaultServiceRegistry buildScopeServices,
@Advice.Argument(0) final ServiceRegistry parentServices) {
CiVisibilityGradleListenerInjector_8_3.injectCiVisibilityGradleListener(
buildScopeServices, parentServices);
Comment thread Outdated

@sarahchen6 sarahchen6 Jun 10, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

When trying to ./gradlew clean assemble, I ran across the error incompatible types: org.gradle.internal.service.scopes.BuildScopeServices cannot be converted to org.gradle.internal.service.DefaultServiceRegistry. Explicitly setting the buildScopeServices type to DefaultServiceRegistry (which is what injectCiVisibilityGradleListener takes) resolves this.

I'm thinking that the Gradle upgrade has led to stricter type resolution as seen from other changes needed in this PR 🤔

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
}
}

@Override
public String muzzleDirective() {
return "skipMuzzle";
}
}
Comment thread Outdated

@sarahchen6 sarahchen6 Jul 2, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The muzzle check for this instrumentation fails on a classloader mismatch when running on Gradle 8.14.3, but since this instrumentation targets Gradle 8.3, skip muzzle like what is done for 8_10_Instrumentation.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
13 changes: 6 additions & 7 deletions 13 dd-java-agent/instrumentation/junit-5.3/build.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

apply from: "$rootDir/gradle/java.gradle"

Comment thread Outdated

@sarahchen6 sarahchen6 Jun 10, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The updates to the latest version of JUnit Jupiter and Platform address the error:

org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests...
Caused by: org.junit.platform.commons.JUnitException: OutputDirectoryProvider not available; probably due to unaligned versions of the junit-platform-engine and junit-platform-launcher jars on the classpath/module path.

Not quite sure why the gradle upgrade initiated this, but others have faced the same problem (unplanned junit issue) and resolved it by updating versions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@nikita-tkachenko-datadog nikita-tkachenko-datadog Jul 9, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I'd like to use the oldest possible version here, as we want to ensure JUnit 5 instrumentation is working for older releases. Could you please double-check which artifacts' version changes when Gradle version is bumped?
You can use commands like the one below:

./gradlew :dd-java-agent:instrumentation:junit-5.3:dependencyInsight --configuration testRuntimeClasspath --dependency org.junit

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sarahchen6 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@bric3 bric3 Jul 9, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@nikita-tkachenko-datadog Maybe something you can do is to declare them as constraints in this case ?

https://docs.gradle.org/current/userguide/dependency_constraints.html

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sarahchen6 sarahchen6 Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good to know. From the command you shared, it looks like 1.12.0 and 5.12.0 are the oldest versions we can pull in (e.g. org.junit.platform:junit-platform-suite-api:1.12.0 and org.junit.jupiter:junit-jupiter-api:5.12.0 get pulled in). I can change that now!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nikita-tkachenko-datadog reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
// JUnit5 5.3.0+ version is needed because of the fix in the TestInheritance test suite names.
Expand Down Expand Up @@ -33,9 +32,9 @@ dependencies {

// versions used below are not the minimum ones that we support,
// but the tests need to use them in order to be compliant with Spock 2.x
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.9.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.12.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.12.0'

latestDepTestImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '+'
latestDepTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '+'
Expand All @@ -44,8 +43,8 @@ dependencies {

configurations.matching({ it.name.startsWith('test') }).each({
it.resolutionStrategy {
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
force group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.2'
force group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.9.2'
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
force group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.12.0'
force group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.12.0'
}
})
13 changes: 6 additions & 7 deletions 13 dd-java-agent/instrumentation/junit-5.3/cucumber-junit-5/build.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ muzzle {
group = 'io.cucumber'
module = 'cucumber-junit-platform-engine'
versions = '[5.4.0,)'
extraDependency "org.junit.platform:junit-platform-launcher:1.9.2"
extraDependency "org.junit.platform:junit-platform-launcher:1.12.0"
}
}

Expand All @@ -19,9 +19,9 @@ dependencies {

testImplementation testFixtures(project(':dd-java-agent:agent-ci-visibility'))

testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-suite', version: '1.9.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-suite-engine', version: '1.9.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
testImplementation group: 'org.junit.platform', name: 'junit-platform-suite', version: '1.12.0'
testImplementation group: 'org.junit.platform', name: 'junit-platform-suite-engine', version: '1.12.0'

testImplementation group: 'io.cucumber', name: 'cucumber-junit-platform-engine', version: '5.4.0'
testImplementation group: 'io.cucumber', name: 'cucumber-java', version: '5.4.0'
Expand All @@ -33,8 +33,7 @@ dependencies {

configurations.matching({ it.name.startsWith('test') }).each({
it.resolutionStrategy {
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
force group: 'org.junit.platform', name: 'junit-platform-suite', version: '1.9.2'
force group: 'org.junit.platform', name: 'junit-platform-suite', version: '1.9.2'
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
force group: 'org.junit.platform', name: 'junit-platform-suite', version: '1.12.0'
}
})
12 changes: 6 additions & 6 deletions 12 dd-java-agent/instrumentation/junit-5.3/junit-5.8/build.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ dependencies {

// versions used below are not the minimum ones that we support,
// but the tests need to use them in order to be compliant with Spock 2.x
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.9.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.12.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.12.0'

latestDepTestImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '+'
latestDepTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '+'
Expand All @@ -47,8 +47,8 @@ dependencies {

configurations.matching({ it.name.startsWith('test') }).each({
it.resolutionStrategy {
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
force group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.2'
force group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.9.2'
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
force group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.12.0'
force group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.12.0'
}
})
6 changes: 3 additions & 3 deletions 6 dd-java-agent/instrumentation/junit-5.3/spock-junit-5/build.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ muzzle {
group = 'org.spockframework'
module = 'spock-core'
versions = "[2.0-groovy-${spockGroovyVersion},)"
extraDependency "org.junit.platform:junit-platform-launcher:1.9.2"
extraDependency "org.junit.platform:junit-platform-launcher:1.12.0"
}
}

Expand All @@ -22,7 +22,7 @@ dependencies {

testImplementation testFixtures(project(':dd-java-agent:agent-ci-visibility'))

testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
testImplementation group: 'org.spockframework', name: 'spock-core', version: "2.2-groovy-${spockGroovyVersion}"

// Broken from 2.4: https://datadoghq.atlassian.net/browse/AIDM-163
Expand All @@ -31,7 +31,7 @@ dependencies {

configurations.matching({ it.name.startsWith('test') }).each({
it.resolutionStrategy {
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.9.2'
force group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.12.0'
force group: 'org.spockframework', name: 'spock-core', version: "2.2-groovy-${spockGroovyVersion}"
}
})
Expand Down
11 changes: 4 additions & 7 deletions 11 ...-agent/instrumentation/netty-promise-4/src/test/groovy/NettyProgressivePromiseTest.groovy
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import datadog.trace.agent.test.base.AbstractPromiseTest
import io.netty.util.concurrent.DefaultEventExecutorGroup
import io.netty.util.concurrent.Future
import io.netty.util.concurrent.GenericProgressiveFutureListener
import io.netty.util.concurrent.ProgressiveFuture
import io.netty.util.concurrent.ProgressivePromise
import spock.lang.Shared

Expand Down Expand Up @@ -61,15 +61,12 @@ class NettyProgressivePromiseTest extends AbstractPromiseTest<ProgressivePromise
when:
runUnderTrace("parent") {
def listeners = iterations.collect { int i ->
return new GenericProgressiveFutureListener<Future<?>>() {

@Override
void operationComplete(Future<?> future) throws Exception {
return new GenericProgressiveFutureListener<ProgressiveFuture<?>>() {
void operationComplete(ProgressiveFuture<?> future) throws Exception {
runUnderTrace("listen$i") {}
}

@Override
void operationProgressed(Future<?> future, long progress, long total) throws Exception {
void operationProgressed(ProgressiveFuture<?> future, long progress, long total) throws Exception {
runUnderTrace("progress$i") {}
}
}
Comment thread Outdated

@sarahchen6 sarahchen6 Jun 10, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

GenericProgressiveFutureListener argument extends ProgressiveFuture (ref), and with the Gradle upgrade, I get the error: The type Future is not a valid substitute for the bounded parameter <F extends io.netty.util.concurrent.ProgressiveFuture<?>>. Explicitly setting the type to ProgressiveFuture instead of Future resolved this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bric3 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@bric3 bric3 Jul 9, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

For reference, there is a warning on master on this, suggesting to use ProgressiveFuture instead:
Image

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sarahchen6 reacted with eyes emoji
All reactions
  • 👀 1 reaction
Expand Down
12 changes: 6 additions & 6 deletions 12 dd-java-agent/instrumentation/scala/build.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final testTasks = scalaVersions.collect { scalaLibrary ->
def (major, minor) = version.split('_').collect(Integer.&valueOf)
Comment thread Outdated

@sarahchen6 sarahchen6 Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Changes in this file address aesthetic comments in the previous Gradle upgrade #8886

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bric3 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
final javaConcatenation = major > 2 || minor > 11 // after 2.11 scala uses java.lang.StringBuilder to perform concatenation

final configuration = configurations.create("${version}Implementation") {
final implementationConfiguration = configurations.create("${version}Implementation") {
canBeConsumed = false
canBeResolved = false
canBeDeclared = true
Expand All @@ -36,14 +36,14 @@ final testTasks = scalaVersions.collect { scalaLibrary ->
canBeConsumed = false
canBeResolved = true
canBeDeclared = false
extendsFrom(configuration)
extendsFrom(implementationConfiguration)
}

dependencies { handler ->
handler.add(configuration.name, scalaLibrary)
handler.add(configuration.name, libs.slf4j)
handler.add(implementationConfiguration.name, scalaLibrary)
handler.add(implementationConfiguration.name, libs.slf4j)
if (javaConcatenation) {
handler.add(configuration.name, project(':dd-java-agent:instrumentation:java-lang'))
handler.add(implementationConfiguration.name, project(':dd-java-agent:instrumentation:java-lang'))
}
}

Expand All @@ -59,7 +59,7 @@ final testTasks = scalaVersions.collect { scalaLibrary ->
.filter { !it.toString().contains('scala-library') } // exclude default scala-library
.minus(files(sourceSets.test.scala.classesDirectory)) // exclude default /build/classes/scala/test folder
.plus(customSourceSet.output.classesDirs) // add /build/classes/scala/${version} folder
.plus(classPathConfiguration) // add new scala-library configuration
.plus(classPathConfiguration) // add new scala-library configuration
systemProperty('uses.java.concat', javaConcatenation)
dependsOn(tasks.named("compile${version.capitalize()}Scala"))
group = 'verification'
Expand Down
2 changes: 1 addition & 1 deletion 2 dd-smoke-tests/gradle/src/test/groovy/datadog/smoketest/GradleLauncherSmokeTest.groovy
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class GradleLauncherSmokeTest extends AbstractGradleTest {
])
String[] command = ["./gradlew", "--no-daemon", "--info"]
if (gradleDaemonCmdLineParams) {
command += "-Dorg.gradle.jvmargs=$gradleDaemonCmdLineParams"
command += "-Dorg.gradle.jvmargs=$gradleDaemonCmdLineParams".toString()
}
Comment thread

@sarahchen6 sarahchen6 Jun 11, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This resolves errors I was getting with assigning GStringImpl to String[] (others' experiences: apache issue, stackoverflow issue). Seems like this should be resolved with groovy 3.0.7+, but I guess not…

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
return shellCommandExecutor.executeCommand(IOUtils::readFully, command)
}
Expand Down
9 changes: 0 additions & 9 deletions 9 dd-smoke-tests/log-injection/build.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ plugins {
apply from: "$rootDir/gradle/java.gradle"
description = 'Log injection Smoke Tests.'

// 3.0.24 added support for JDK 24 via ASM 9.7.1
// https://groovy-lang.org/changelogs/changelog-3.0.24.html
// https://asm.ow2.io/versions.html#9.7.1
configurations.all {
resolutionStrategy {
force 'org.codehaus.groovy:groovy-all:3.0.24'
}
}
Comment thread
Comment on lines -10 to -17

@bric3 bric3 Jul 9, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

note: We may have to resurrect this code for JDK 25.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sarahchen6 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

configurations {
jcl
log4j1
Expand Down
3 changes: 2 additions & 1 deletion 3 gradle/java_no_deps.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.gradle.api.internal.provider.PropertyFactory
import org.gradle.jvm.toolchain.internal.SpecificInstallationToolchainSpec

apply plugin: 'java-library'
Expand Down Expand Up @@ -175,7 +176,7 @@ project.afterEvaluate {
def testJvmHomePath = getJavaHomePath(testJvmHome)
// Only change test JVM if it's not the one we are running the gradle build with
if (currentJavaHomePath != testJvmHomePath) {
def jvmSpec = new SpecificInstallationToolchainSpec(project.getObjects(), file(testJvmHomePath))
def jvmSpec = new SpecificInstallationToolchainSpec(project.services.get(PropertyFactory), file(testJvmHomePath))
// The provider always says that a value is present so we need to wrap it for proper error messages
Comment thread Outdated

@sarahchen6 sarahchen6 Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This change is needed due to the introduced error groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.gradle.jvm.toolchain.internal.SpecificInstallationToolchainSpec(org.gradle.api.internal.model.DefaultObjectFactory, File). I'm not sure exactly where this comes from, but since this is part of Gradle's internal implementation, breaking changes can be made unannounced.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bric3 bric3 Jul 9, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This internal Gradle type has changed twice its constructor signature since 8.5

  • In 8.8 : Introduce daemon JVM criteria  gradle/gradle#28731 (ObjectsFactory arg was removed)
  • In 8.13 : Daemon auto-provisioning downloads toolchain from provided url gradle/gradle#29166 (PropertyFactory arg was added)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sarahchen6 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Provider<JavaLauncher> launcher = providers.provider {
try {
Expand Down
2 changes: 1 addition & 1 deletion 2 gradle/libs.versions.toml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ okhttp-legacy = "[3.0,3.12.12]" # 3.12.x is last version to support Java7
okio = "1.17.6" # Datadog fork

spock = "2.3-groovy-3.0"
groovy = "3.0.17"
groovy = "3.0.24"
junit5 = "5.9.2"
Comment thread Outdated

@sarahchen6 sarahchen6 Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

When upgrading from Gradle <= 8.13, Groovy needs to be upgraded to 3.0.24: https://docs.gradle.org/current/userguide/upgrading_version_8.html#upgrade_to_groovy_3_0_24

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bric3 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
logback = "1.2.3"
bytebuddy = "1.17.5"
Expand Down
19 changes: 11 additions & 8 deletions 19 gradle/test-suites.gradle
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.gradle.api.plugins.jvm.JvmTestSuite

ext.addTestSuiteExtendingForDir = (String testSuiteName, String parentSuiteName, String dirName) -> {
ext.addTestSuiteExtendingForDir = { testSuiteName, parentSuiteName, dirName ->
testing {
suites {
create(testSuiteName, JvmTestSuite, {
Expand All @@ -27,16 +27,12 @@ ext.addTestSuiteExtendingForDir = (String testSuiteName, String parentSuiteName,
}
}
}
dependencies {
implementation project(project.path)
}
})
}
}

configurations {
def extendConf = {
String suffix ->
def extendConf = { suffix ->
def config = named("${testSuiteName}${suffix}")
def parentConfig = named("${parentSuiteName}${suffix}")
if (parentConfig.present) {
Expand Down Expand Up @@ -65,12 +61,19 @@ ext.addTestSuiteExtendingForDir = (String testSuiteName, String parentSuiteName,
from(sourceSets.named(testSuiteName).get().output)
archiveClassifier = testSuiteName
}

// The project dependency definition cannot sit inside previous blocks. As of Gradle 8.8, configurations cannot be mutated after they have been used as part of the dependency graph.
// See: https://docs.gradle.org/current/userguide/upgrading_version_8.html#mutate_configuration_after_locking
// And related issue: https://github.com/gradle/gradle/issues/28867
project.dependencies {
"${testSuiteName}Implementation"(project(project.path))
}
}
Comment thread Outdated

@sarahchen6 sarahchen6 Jun 10, 2025

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Project dependencies was separated out due to the error The value for property 'dependencies.implementation' property 'dependencies' is final and cannot be changed any further. that prevented Gradle compilation. I think this is due to the deprecation of mutating configurations after observation that was introduced after 8.7: https://docs.gradle.org/current/userguide/upgrading_version_8.html#mutate_configuration_after_locking

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@bric3 bric3 Jul 9, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Indeed this looks like it : gradle/gradle#28867

Maybe drop a comment there, to explain why the documented method did not work. I wasn't able to reliably reproduce this issue. So there might be something odd happending.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sarahchen6 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

ext.addTestSuiteForDir = (String testSuiteName, String dirName) -> {
ext.addTestSuiteForDir = { testSuiteName, dirName ->
ext.addTestSuiteExtendingForDir(testSuiteName, 'test', dirName)
}

ext.addTestSuite = (String testSuiteName) -> {
ext.addTestSuite = { testSuiteName ->
ext.addTestSuiteForDir(testSuiteName, testSuiteName)
}
Binary file modified BIN -19.5 KB (69%) gradle/wrapper/gradle-wrapper.jar
Show comments
View file
Open in desktop
Binary file not shown.
4 changes: 2 additions & 2 deletions 4 gradle/wrapper/gradle-wrapper.properties
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
# Please note that the version specific cache directory in
# .gitlab-ci.yml needs to match this version.
distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.