Currently, the properties
configuration is not using lazy APIs, so the configuration phase time will be slower and it can have order issues. For example:
properties.property("sonar.sources", project.kotlinSrcDirs.get())
// `project.kotlinSrcDirs.get()` I need to get the property
// eagerly as properties is not compatible with `Provider` APIs
There I am collecting the source directories, if for some reason they are changed after Sonarqube is configurated, so the directories will be incorrect. If the property function accepts Provider<String>
and later the task uses it, this problem would be gone.
It should be possible to get this working and, at first glance, without breaking compatibility as SonarProperties
already accepts Object
and SonarTask
has the properties
map private too.