Cannot use the newest version with SonarQube Plugin
giftkugel opened this issue · 3 comments
We are using the Node Plugin to handle our Node environment.
After updating to the newest version of the Gradle Node Plugin, the SonarQube task throws an error.
plugins {
id "org.sonarqube" version "3.0"
id "com.github.node-gradle.node" version "3.0.1"
}
node {
version = "${nodeVersion}"
download = true
}
Executing ./gradlew sonarqube
fails with:
Execution failed for task ':sonarqube'. groovy.lang.MissingPropertyException: Could not get unknown property 'variant' for extension 'node' of type com.github.gradle.node.NodeExtension.
Variant is not mentioned in the documentation, but of course part of the Code
Do we have to set variant? Or does the SonarQube Plugin tries to access something which it should not care about?
This one looks like an interesting case, so first of all, I have no idea why sonarqube would be looking at the node-plugins extension
Secondly, yes, in the old version of this plugin the one that's in this repository (and abandoned by its author see #315 for details)
However, the plugin you're using is the maintained fork and that fork does not have a variant
on NodeExtension
https://github.com/node-gradle/gradle-node-plugin/blob/3.0.1/src/main/kotlin/com/github/gradle/node/NodeExtension.kt
But to get an idea on where it goes wrong you probably have to run with --stacktrace
and an issue should probably be reported at sonarqube's issue tracker
Actually this might not be caused by sonarqube, but without --stacktrace
and/or your full build-script it's hard to say for certain
Thank you for the fast response.
I didn't recognize that we are using a fork ... sorry for creating the issue here.
I think I will open the issue in the repository of the fork because we used that fork for a time, and just updated to a newer version.
I am sorry for the circumstances. Think the issue can be closed here.