gradle/foojay-toolchains

error... reported

nagkumar opened this issue · 3 comments

* 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.

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

StefMa commented