Any idea where this comes from? Gradle complains a...
# community-support
s
Any idea where this comes from? Gradle complains about
LibrariesForLibs
to be missing, but it's actually listed as a extension type...
Copy code
Extension of type 'LibrariesForLibs' does not exist. Currently registered extension types: [ExtraPropertiesExtension, DependencyAnalysisSubExtension, LibrariesForKtorLibs, LibrariesForLibs, LibrariesForOrtLibs, VersionCatalogsExtension, RootProjectAccessor, ReportingExtension, DetektExtension]
j
Probably you are getting it too early or in a place you shouldn't call it.
A quick way, and not recommended, checker, would be to call it in
afterEvaluate
.
But without seeing the code it is hard to know
s
The thing is that it doesn't happen everything / not for all developers in the team / not on all machines. So it's non-deterministic.
Here you can see the failure on CI, and here's the code.
a
Looks like the buildscript classpath inconsistency problem https://github.com/gradle/gradle/issues/27218 Similar to https://github.com/gradle/gradle/issues/17559.
v
If it says it cannot find it, but it is in the list, that should usually mean that the classes come from different class loaders and thus are not the same class. If the problem would be getting it too early, it would not be in the list.
You could also refrain from using my hack-around and use the catalogs extension like you also do for
ortLibs
. It feels a bit inconsistent, that you use my hack-around for one of the version catalogs, but not for the other. 😄
s
Hmm, that might be an idea indeed...