Skip to content

Commit f30523e

Browse files
jbachorikclaude
andcommitted
Fix Gradle 9 toolchain probing for JavaExec tasks
Set explicit executable for runUnwindingValidator and unwindingReport tasks to avoid Gradle 9 javaLauncher toolchain probing failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 262e6b1 commit f30523e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

build-logic/conventions/src/main/kotlin/com/datadoghq/profiler/ProfilerTestPlugin.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ class ProfilerTestPlugin : Plugin<Project> {
235235
runTask.mainClass.set(appMainClass)
236236
runTask.classpath = sourceSets.getByName("main").runtimeClasspath + mainCfg
237237

238+
// Use test JDK to avoid Gradle 9 toolchain probing issues
239+
runTask.setExecutable(PlatformUtils.testJavaExecutable())
240+
238241
if (testEnv.isNotEmpty()) {
239242
testEnv.forEach { (key, value) ->
240243
runTask.environment(key, value)
@@ -261,6 +264,9 @@ class ProfilerTestPlugin : Plugin<Project> {
261264
"--output-file=build/reports/unwinding-summary.md"
262265
)
263266

267+
// Use test JDK to avoid Gradle 9 toolchain probing issues
268+
reportTask.setExecutable(PlatformUtils.testJavaExecutable())
269+
264270
if (testEnv.isNotEmpty()) {
265271
testEnv.forEach { (key, value) ->
266272
reportTask.environment(key, value)

0 commit comments

Comments
 (0)