Skip to content

Commit 976bf8f

Browse files
whitewhite
authored andcommitted
Fix javaexec() method not found error in Gradle 9.x
Replace project.javaexec {} with services.get(org.gradle.process.ExecOperations).javaexec {} for compatibility with Gradle 9.x where the direct method was removed.
1 parent 8b78811 commit 976bf8f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python-embed-examples/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ tasks.register('runAllExamples') {
6161
def theMainClass = mainClass
6262
def theClasspath = subproject.sourceSets.main.runtimeClasspath
6363
try {
64-
project.javaexec {
64+
services.get(org.gradle.process.ExecOperations).javaexec {
6565
it.workingDir = subproject.projectDir
6666
it.classpath = theClasspath
6767
it.mainClass.set(theMainClass)

0 commit comments

Comments
 (0)