예제 #1
0
 @Override
 public String toString() {
   return new StringBuilder()
       .append(key)
       .append(':')
       .append(minimalVersion.getName())
       .toString();
 }
예제 #2
0
  /**
   * Find out if this plugin is compatible with a given version of SonarQube. The version of SQ must
   * be greater than or equal to the minimal version needed by the plugin.
   */
  public boolean isCompatibleWith(String sqVersion) {
    if (null == this.minimalSqVersion) {
      // no constraint defined on the plugin
      return true;
    }

    Version effectiveMin = Version.create(minimalSqVersion.getName()).removeQualifier();
    Version actualVersion = Version.create(sqVersion).removeQualifier();
    return actualVersion.compareTo(effectiveMin) >= 0;
  }