sonarqube - Externalize the sonar configuration properties to gradle.properties file in user home -


i want externalize sonar configuration properties build.gradle file gradle.properties file.

for example, apply plugin: 'sonar-runner'

sonarrunner

sonarproperties

                property "sonar.java.coverageplugin", "jacoco"                  property "sonar.host.url", "http://10.42.58.229:9000/"                 property "sonar.jdbc.url", "jdbc:mysql://10.42.58.229:3306/sonar"                 property "sonar.jdbc.driverclassname", "com.mysql.jdbc.driver" 

i want pass property values gradle.properties file, present in user home.

this possible trick have use system properties (using systemprop prefix):

systemprop.sonar.host.url=http://localhost:9000 systemprop.sonar.jdbc.url=jdbc:postgresql://localhost/sonar systemprop.sonar.jdbc.username=sonar systemprop.sonar.jdbc.password=sonar systemprop.sonar.login=admin systemprop.sonar.password=admin 

see: https://docs.sonarqube.org/display/scan/analyzing+with+sonarqube+scanner+for+gradle#analyzingwithsonarqubescannerforgradle-globalconfigurationsettings

this should work old 'sonar-runner' plugin feel free give try new 'org.sonarqube' plugin: https://plugins.gradle.org/plugin/org.sonarqube


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -