Search code examples
gradlesonarqubesonarqube-apisonarqube-plugin

SonarQube plugin: how to get property value from command line -D


I am new to sonar plugin development. I wrote a plugin and add PropertyDefine to context. And then I wanna get my property value passed by

gradle sonarqube -Dmy.proper.name=xxx

I don't know what are the next steps? Plz help. Thanks.


Solution

  • Hi @agabrys thanks for your answer. But I found out that if you wanna get the property from Scanner side, you need make a PostJob like class to deal with it. I didn't clearly know that so I didn't know why I couldn't get that property. Thanks anyway.