You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int releaseNumber = project.gradle.gradleVersion.split('\\.')[1] as int
This assumes that the second part of the split is a simple number. In my case, I have a custom build (or a snapshot build of Gradle) which looks like this: 1.12-20140612154955+0000. That causes this exception:
Caused by: java.lang.NumberFormatException: For input string: "12-20140612154955+0000"
at org.akhikhl.gretty.GrettyPlugin.apply(GrettyPlugin.groovy:580)
at org.akhikhl.gretty.GrettyPlugin.apply(GrettyPlugin.groovy)
at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:104)
at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:68)
at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:34)
The text was updated successfully, but these errors were encountered:
I managed to reproduce and fix this bug.
The fix is available in Gretty 1.1.5-SNAPSHOT.
If you want to use snapshot versions, you'll need to add http://oss.jfrog.org/artifactory/oss-snapshot-local to buildscript and project repositories.
On https://github.com/akhikhl/gretty/blob/master/libs/gretty/src/main/groovy/org/akhikhl/gretty/GrettyPlugin.groovy#L583:
This assumes that the second part of the split is a simple number. In my case, I have a custom build (or a snapshot build of Gradle) which looks like this: 1.12-20140612154955+0000. That causes this exception:
The text was updated successfully, but these errors were encountered: