Is there a way to define teamcity['build.number'] property from command line? I tried -Pteamcity.build.number=1 but it didn't work.
I have a build.gradle file with this task in it:
distTar {
baseName = project.name+'.'+
project.version+'.'+
System.getProperty("system.rnf.brach_name")+'.'+
teamcity['build.number']+'.'+
teamcity['build.vcs.number.1']
archiveName = baseName+'.tar'
into(baseName) {
from '.'
include 'config/*'
include 'run-script/*.sh'
}
}
It works on the build server, but it drives all the developers crazy, because we don't have teamcity installed on our machines, and any gradle command gives us an error:
$ gradle tasks
FAILURE: Build failed with an exception.
* Where:
Build file '/home/me/work/myproject/build.gradle' line: 31
* What went wrong:
A problem occurred evaluating root project 'myproject'.
> Could not find property 'teamcity' on task ':MyProject:distTar'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED