The plugin is published on the Gradle Plugin Portal and can be applied to a build as follows.
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.rodm:gradle-teamcity-dsl-plugin:0.6"
}
}
apply plugin: "com.github.rodm.teamcity-dsl"
or using the plugins
configuration block
plugins {
id "com.github.rodm.teamcity-dsl" version "0.6"
}
The plugin requires a repository to be configured that allows the TeamCity DSL plugins to be downloaded. In example
below the property teamcityServer
needs to be defined with the hostname of the machine running the TeamCity Server.
repositories {
maven {
url "http://${teamcityServer}:8111/app/dsl-plugins-repository"
}
}
This plugin requires Java 8, Gradle 4.0 and TeamCity 10.x or later
The following properties are defined in the teamcityConfig
configuration block.
-
teamcityVersion
: The version of the TeamCity DSL libraries to use. Defaults to '10.0.5'. -
format
: The format of the DSL, currently only kotlin is supported. -
baseDir
: The directory containing the Kotlin DSL projects and files. Defaults to '.teamcity'. -
destDir
: The directory the settings in XML format are written to. Defaults to '${buildDir}/generated-configs'.