This message was deleted.
# community-support
s
This message was deleted.
w
Also, the documentation doesn't seem to indicate how this new class is used. Does gradle pick it up and understand what to do automagically? Should the user register it somewhere? Use it in some other part of the build scriot?
a
id
comes from
context.details
, because
run {}
(docs) converts it to a receiver (I assume that's what you're asking?)
w
Right, thanks. Any thoughts on where the class gets used?
j
There is this general documentation about "metadata rules", which is the underlying mechanism to add any kind of "missing" metadata to a componente: https://docs.gradle.org/current/userguide/component_metadata_rules.html#basics_of_writing_a_component_metadata_rule
About the docs: The confusing part (IMO) is that there are many different syntaxes to define a rule (inline, extra class in Kotlin, extra class in Groovy, extra class in Java, ...) which are not consistently used in the docs. I personally think the use of Kotlin specifics such as
context.details.run {
is not helpful here (if folks unfamiliar with Kotlin read it).
👍 1
➕ 2
w
Thanks for those links. The capabilities section could be improved with sentence like "We describe capabilities by writing a new component metadata rule which are discussed in detail here: <link>". After years with gradle and writing quite a few plugins, I've never encountered these features.
👍 1