Gradle and lazy configurations

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.

Hey there.

Can you confirm what version of the Scanner for Gradle you’re using?

I am using the latest one, everything I shared above is after reading the current code, which is public on GitHub.