downloadDir property in teamcity configuration block doesn't work
vbedrosova opened this issue · comments
In my gradle scipt I try to specify downloadDir property but as far as I see gradle-teamcity-plugin anyway downloads TeamCity to the default location:
teamcity {
agent {
descriptor = project(':proj').file('teamcity-plugin.xml')
}
server {
descriptor = file("$rootDir/teamcity-plugin.xml")
}
homeDir = file("...")
dataDir = file("...")
javaHome = file("...")
version = "..."
downloadDir = file("...")
}
I tried the following and the overrides worked
downloadDir = 'mydownloads'
downloadDir = file('mydownloads')
Then I had a look at your usage in the teamcity-aws-codedeploy-plugin project.
downloadDir = file(downloadDir)
The above doesn't override the downloadDir with the value from the root project because the property passed into the file() function is the downloadDir from the teamcity configuration. To use the value defined in the root project you can prefix it with the project as follows
downloadsDir = file(project.downloadDir)
Another problem is the definition of the properties in the ext
block, and trying to override if a Gradle property is set, I found this approach doesn't work. You may need to define each property on a separate line, as in this build script build.gradle
Hopefully that resolves your problem.