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 wit
It's a bit of hack, but this is the temporary solution I came up with. Still waiting for a better one though.
in build.gradle I added:
if (hasProperty("dev")) {
apply from: 'teamcity.gradle'
}
I have this in teamcity.gradle:
task teamcity {
teamcity['build.number'] = 1
teamcity['build.vcs.number.1'] = 0
}
And I have this in gradle.properties:
dev=1
gradle.properties and teamcity.gradle is in .gitignore. Optionally instead of adding dev=1 to gradle.properties, you can define it in the command line: -Pdev=1, this way you can do with or without the hack on the same machine (though I don't think it's useful)