title: How to compare version numbers in gradle?
body: <p>I need to use a different Gradle plugin version dependening the Gradle version. How can I compare a version in Gradle? The variable gradle.gradleVersion is a string and can't good compare. The follow does not work if the minor version has only one digit.</p>
  
  <pre><code>buildscript {
    dependencies {
       def ver = gradle.gradleVersion &gt;= '2.12' ? '+' : '1.5.+'
       classpath group: 'de.inetsoftware', name: 'SetupBuilder', version: ver
    }
  }
  </code></pre>