When both Jandex and SonarQube Gradle Plugins are present in the same project, it results in:
A problem was found with the configuration of task ':sonarResolver' (type 'BuildFeaturesEnabledResolverTask').
- Gradle detected a problem with the following location: 'sonar-jandex-repro/build/resources/main'.
* Try:
> Declare task ':jandex' as an input of ':sonarResolver'
> Declare an explicit dependency on ':jandex' from ':sonarResolver' using Task#dependsOn
> Declare an explicit dependency on ':jandex' from ':sonarResolver' using Task#mustRunAfter
The behaviour was introduced in this commit SCANGRADLE-247 Resolve class paths through a dedicated project based … · SonarSource/sonar-scanner-gradle@a50ce7d · GitHub
Reproducer is here: GitHub - BrianSetz/sonar-jandex-dep-reproducer
Simply run:
./gradlew sonarResolver
Workaround:
tasks.named("sonarResolver") {
dependsOn("jandex")
}
I would love a more structural solution to this problem, any thoughts?