gradle-release
gradle-release copied to clipboard
unexpected token in version
Hi there, I run the following command:
/gradlew release -Prelease.useAutomaticVersion=true
But throws this error:
:name-service:runBuildTasks FAILED
:release FAILED
Release process failed, reverting back any changes made by Release Plugin.
FAILURE: Build failed with an exception.
* Where:
Build file '/path/to/project/build.gradle' line: 46
* What went wrong:
Could not compile build file '/path/to/project/build.gradle'.
> startup failed:
build file '/path/to/project/build.gradle': 46: unexpected token: 0 @ line 46, column 15.
version = 1.0.0
^
And mencioned line is:
version = '1.0.0-SNAPSHOT'
Is it normal this behaviour? Or I got something wrong with my version variable?
Should work I think and the problem is that the quotes are missing. If you can move it to the gradle.properties and change config it should be fine but build.gradle is supported. Need to check that
The quotes are not missing. The log of gradle shows it without them. This is how i have the version in Build.gradle
version = '1.0.0-SNAPSHOT'
Because the nature of my Work I can't touch the gradle.properties.
me to versionPropertyFile = 'build.gradle'
Hi all, I have the same issue. In my build.gradle I have:
version = '1.0.3-SNAPSHOT'
release {
versionPropertyFile = 'build.gradle'
...
}
because I need to generate a jar based on version specified.
If during run gradle release
I set version with quotes to bypass the problem in final file I find:
version = '1.0.4'-SNAPSHOT
obtaining an artifact with name with the quotes.
Is there any workaroud?
Thanks