error... reported
nagkumar opened this issue · 3 comments
nagkumar commented
* What went wrong:
An exception occurred applying plugin request [id: 'org.gradle.toolchains.foojay-resolver-convention', version: '0.5.0']
> Failed to apply plugin 'org.gradle.toolchains.foojay-resolver-convention'.
> class org.gradle.api.internal.project.DefaultProject_Decorated cannot be cast to class org.gradle.api.initialization.Settings (org.gradle.api.internal.project.DefaultProject_Decorated and org.gradle.api.initialization.Settings are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader @335eadca)
StefMa commented
You have to apply the plugin in a settings.gradle[.kts] file. Not in a build.gradle[.kts] file.
nagkumar commented
Oh Thank You, your suggestion fixes the error..
however, this URL says it as put in build.gradle, may be to fix the docs
https://docs.gradle.org/8.1.1/userguide/toolchains.html#sec:provisioning
StefMa commented
The docs are correct.
You have to apply the toolchain plugin in your settings file. But you can
change the toolchain for each individual build within the build gradle file... 🙃
…On Tue, May 30, 2023, 1:11 PM Raja Nagendra Kumar ***@***.***> wrote:
Oh Thank You, your suggestion fixes the error..
however, this URL says it as put in build.gradle, may be to fix the docs
https://docs.gradle.org/8.1.1/userguide/toolchains.html#sec:provisioning
[image: image]
<https://user-images.githubusercontent.com/332234/241948422-d3ae9aa6-967b-44e7-ae34-01199e4cb578.png>
—
Reply to this email directly, view it on GitHub
<#29 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOBQ6ZNQ4C7RKQAFRYHO4TXIXIVRANCNFSM6AAAAAAYT2ZCYM>
.
You are receiving this because you commented.Message ID:
***@***.***>