This message was deleted.
# plugin-development
s
This message was deleted.
v
Besides that it is not the same code (
libraryAliases
vs.
dependencyAliases
), you just call it on the wrong object.
You look in the
extensions
of the
Task
which also is
ExtensionAware
but does not have the extension you are after and if you query
extensions
explicitly there is no delegation strategy.
Use
project.extensions
and it should work just fine.
Maybe someone should post a feature request to add the
ExtensionAware
instance to the error message, I also fell into that trap a few times already.
I don't think using the API you mention is going to help you because it represents a realized catalog. Typically won't give you where a version is defined.
j
It works, thanks a lot to you both!
I don't think using the API you mention is going to help you because it represents a realized catalog.
That's fine, I'm not modifying the file
libs.versions.toml
, I'm using its content to rewrite the files
build.gradle(.kts)
https://github.com/jmfayard/gradle-versions-catalog/commit/c9f9dfe12861ea409c06416fc2d25f150067e9fb
m
mmm, having the versions in a separate file kind of defeats the concept, no?
j
Generating the
libs.versions.toml
and updating the
build.gradle(.kts)
is half of the work of integrating refreshVersions and the versions catalog. The second half will be that refreshVersions add the available versions updates as comments in the
libs.versions.toml
directly, if the versions are present there.