Could not get unknown property ‘runtime’ for configuration container of type org.gradle.api.internal.artifacts.configurations

We Are Going To Discuss About Could not get unknown property ‘runtime’ for configuration container of type org.gradle.api.internal.artifacts.configurations. So lets Start this Java Article.

Could not get unknown property ‘runtime’ for configuration container of type org.gradle.api.internal.artifacts.configurations

  1. Could not get unknown property 'runtime' for configuration container of type org.gradle.api.internal.artifacts.configurations

    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.

  2. Could not get unknown property 'runtime' for configuration container of type org.gradle.api.internal.artifacts.configurations

    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.

Solution 1

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.
Gradle7 docs
After that, I succeeded in compilitation and get the true constructure of project.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1/userguide/command_line_interface.html#sec:command_line_warnings

Project Constructure

Original Author Of This Content

Solution 2

Use runtimeOnly as mentioned in the upgrade documentation of gradle:

https://docs.gradle.org/current/userguide/upgrading_version_6.html#sec:configuration_removal

Original Author Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment