Class SonarQubeProperties


  • public class SonarQubeProperties
    extends java.lang.Object
    The SonarQube properties for the current Gradle project that are to be passed to the SonarQube Scanner.

    The properties map is already populated with the defaults provided by Gradle, and can be further manipulated as necessary. Before passing them on to the SonarQube Scanner, property values are converted to Strings as follows:

    • Iterables are recursively converted and joined into a comma-separated String.
    • All other values are converted to Strings by calling their toString() method.
    • Constructor Summary

      Constructors 
      Constructor Description
      SonarQubeProperties​(java.util.Map<java.lang.String,​java.lang.Object> properties)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getProperties()  
      void properties​(java.util.Map<java.lang.String,​?> properties)
      Convenience method for setting multiple properties.
      void property​(java.lang.String key, java.lang.Object value)
      Convenience method for setting a single property.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SonarQubeProperties

        public SonarQubeProperties​(java.util.Map<java.lang.String,​java.lang.Object> properties)
    • Method Detail

      • property

        public void property​(java.lang.String key,
                             java.lang.Object value)
        Convenience method for setting a single property.
        Parameters:
        key - the key of the property to be added
        value - the value of the property to be added
      • properties

        public void properties​(java.util.Map<java.lang.String,​?> properties)
        Convenience method for setting multiple properties.
        Parameters:
        properties - the properties to be added
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
        Returns:
        The Sonar properties for the current Gradle project that are to be passed to the Sonar gradle.