Returns the major and minor part of the groovy version excluding the point/patch part of the version. E.g. 3.0.0, 3.0.0-SNAPSHOT, 3.0.0-rc-1 all have 3.0 as the short version. @since 3.0.1
()
| 133 | * @since 3.0.1 |
| 134 | */ |
| 135 | public static String getShortVersion() { |
| 136 | String full = getVersion(); |
| 137 | int firstDot = full.indexOf('.'); |
| 138 | int secondDot = full.indexOf('.', firstDot + 1); |
| 139 | if (secondDot < 0) { |
| 140 | throw new GroovyBugError("Unexpected version found: " + full); |
| 141 | } |
| 142 | return full.substring(0, secondDot); |
| 143 | } |
| 144 | } |
nothing calls this directly
no test coverage detected