Question: I'm seeing a few examples of people comm...
# community-support
k
Question: I'm seeing a few examples of people commissioning settings plugins to set certain properties of a
Project
where lazy
Property
accessors are unavailable - for example, configuring a
RepositoryHandler
. Is that actually a recommended practice, or is this practice an interim measure of some kind?
v
Not fully sure what you mean. Someone is writing a settings plugin to configure
project.repositories
? Sounds strange to me, especially depending on what kind of plugin that is. If it is some public plugin it should never define and repositories, that itself is very bad practice. At least without a way to disable it, or if that is the some purpose of the plugin, so that applying it is the actual opt-in. Any other case would for example make the plugin unusable in situations where a build must control its repositories like it should always be, for example to fulfill corporate rules to only use internal mirrors or proxies that are independent, audited, and secured. If it is about corporate convention plugins or similar, it is different. There I would have a settings plugin, but still not set
project.repositories
, but
dependencyResolutionManagement.repositories
and also set the mode to "fail on project repositories" to detect such above-mentioned misbehaving plugins.