This is because of the differences between your gradle version and gradle7. From Gradle 6.x, the use of the parameter configurations.runtime to get configurations of program execution is disabled. Instead, you can use configurations.runtimeClasspath to achieve the same ability.